replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Program arguments using GETARG
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 

Program arguments using GETARG

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



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Tue Jan 26, 2010 10:55 am    Post subject: Program arguments using GETARG Reply with quote

The question is how to handle a program argument like:
C:\Documents and Settings\adgejo1\MoDaMa\Hydro_9.6mm\RESULTS

To assure that the complete path (including the empty spaces) is passed the argument needs to be placed between " or ', i.e.
"C:\Documents and Settings\adgejo1\MoDaMa\Hydro_9.6mm\RESULTS"

Using CALL GETARG(1,PATH) the " of ' are included in the variable path and must be removed in the program to get the correct path. Usually the " or ' must be removed automatically.

Is my interpretation correct or are the perhaps some compiler option?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jan 26, 2010 12:11 pm    Post subject: Reply with quote

If you pass a path as a command line argument then it is best to enclose it in double quotes.

GET_COMMAND and GET_COMMAND_ARGUMENT are standard Fortran 2003 intrinsics that have been implemented in FTN95.
Back to top
View user's profile Send private message AIM Address
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Tue Jan 26, 2010 12:20 pm    Post subject: Reply with quote

I played a bit with GET_COMMAND_ARGUMENT. The following arguments are valid:
1.) C:\Docume~1\adgejo1\MoDaMa\Hydro_9.6mm\RESULTS and
2.) "C:\Documents and Settings\adgejo1\MoDaMa\Hydro_9.6mm\RESULTS"

In case of the second option, the double quotes are removed automatically.
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