Silverfrost Forums

Welcome to our forums

ftn95 Option /undef and batch mode

9 May 2014 10:10 #14056

Hello,

I would like to make use of ftn95's option /undef to check if an executable has undefined variables or to check for array bounds etc.

To this end I compile and link the application (using option /undef) and then start it. If e.g. there are problems with the bounds of an array, an exception window pops up showing that a run time error has occurred and displaying something like 'Array index out of bounds'. I would normally save the error message to a file and then close the application using the buttons of the exception window.

Now I would like to do the same in batch mode. Is it possible to make the application save the error message of the exception window to a file and then close automatically (i.e. without user input)?

Thanks in advance, Dietmar

9 May 2014 11:22 #14057

Try setting the environment variable SALFENVAR to kill_dialogbox.

This should suppress the popup window and direct the output to the standard output.

Then you will need to redirect the standard output to a file in the batch file.

Try something like...

program.exe >program.out

There may be a way to append the output to one file for multiple programs but, off hand, I don't know how to do this.

9 May 2014 3:06 #14058

Paul,

thank-you very much, this helped a lot.

I used it for checking an executable with winio output and used ftn95 options

/-windows /undef

in addition to the normal options in use.

Regards, Dietmar

9 May 2014 5:26 #14059

Quoted from PaulLaidler

There may be a way to append the output to one file for multiple programs but, off hand, I don't know how to do this.

For output from more than one run or more than one program you can use

program.exe >>program.out

12 May 2014 1:35 #14069

Redirecting the error output might also help, such as:

set options=%1.f95 /check /lgo ftn95 %options% >> %1.log 2>&1

Please login to reply.