Computer Hope

Microsoft => Microsoft Windows => Windows XP => Topic started by: Chuck_Calif on November 15, 2005, 12:54:12 PM

Title: exe works outside batch file, not inside.
Post by: Chuck_Calif on November 15, 2005, 12:54:12 PM
I have a fairly large Fortran 77/90 & C program, compiled using Compaq Visual Fortran 6 & Microsoft Visual C++ 6 under Win XP.  On a particular test case it generally executes ok when invoked outside a batch file, but always fails when invoked from a particular batch file.  It stops on a Fortran 90 Allocate statement, but does not return the STAT result coded into that statement.  Seems to relate more to how much storage has been allocated rather than to the particular array being allocated, because I can reorder the allocation of different arrays and the stop does not occur on the same array.

Although this is a large body of code, the test case is small and should not be requiring a large amount of allocated storage.

I have tryed cutting the batch file down to just the statements that occur before invoking the EXE file (which are SET /P, ECHO, COPY, DEL, IF EXIST), then running the truncated batch file, then executing the EXE outside the batch file.  The EXE also fails in that usage.

Any ideas on what I should be looking for to fix this?