Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System Call from Fortran program 1

Status
Not open for further replies.

vefanuri

Technical User
Nov 6, 2001
2
US
Hi,
I am using the 'call system' statement in my fortran code to run some outside executable:

cmd = 'some executable'
call system(cmd)


I was wondering how standard this 'call system' routine is; i.e., would the code be portable to any operating system? Is there any other alternative without the 'call system'?
I'll appreciate any reply...
 
The system call is available on all flavors of unix fortran that I know of and on Compaq visual fortran for the PC. I believe DEC VMS fortran uses lib$spawn instead. Your biggest problem if you port to another platform will probably be with 'some executable'.
Hope this helps. CaKiwi
 
Thanks for your reply CaKiwi... I guess there is no ANSI Fortran standard for this command. It really is compiler dependent. But as you point out, it is very similar across different platforms. And you are right, that 'some executable' might be problematic than the system call, but hopefully it will be just an executable file (ie program) that needs to be fired up, ie not a shell command...
Best regards,
-Vefa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top