replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ftn95 Option /undef and batch mode
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ftn95 Option /undef and batch mode

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri May 09, 2014 11:10 am    Post subject: ftn95 Option /undef and batch mode Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8255
Location: Salford, UK

PostPosted: Fri May 09, 2014 12:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri May 09, 2014 4:06 pm    Post subject: ftn95 Option /undef and batch mode Reply with quote

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
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri May 09, 2014 6:26 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:

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
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2621
Location: Sydney

PostPosted: Mon May 12, 2014 2:35 am    Post subject: Reply with quote

Redirecting the error output might also help, such as:

set options=%1.f95 /check /lgo
ftn95 %options% >> %1.log 2>&1
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group