- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- RUNNING A COMMAND IN FOTRAN
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2006 02:03 AM
тАО03-21-2006 02:03 AM
Does anyone know how to run a command in FOTRAN i.e. the same way the statment "system" does in ANSI C. Pls advise.
Thanks!
Best regards
Henry
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2006 02:27 AM
тАО03-21-2006 02:27 AM
Solutionaccording to
http://www.docs.hp.com/en/B3908-90003/B3908-90003.pdf
the system(str) command should get you want you need, at least on hp using fortran90.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2006 02:51 AM
тАО03-21-2006 02:51 AM
Re: RUNNING A COMMAND IN FOTRAN
Here it is,
http://www.codecomments.com/archive271-2005-3-429704.html
System commands only added in Fortran 2003.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2006 02:54 AM
тАО03-21-2006 02:54 AM
Re: RUNNING A COMMAND IN FOTRAN
Man 3F system for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2006 09:19 AM
тАО03-22-2006 09:19 AM
Re: RUNNING A COMMAND IN FOTRAN
character*80 command
....
command = '/usr/local/bin/myprog'
call system(command)
You can also build commands in the program:
command = 'cat ' // someFileName
or even in the argument:
call system('cat ' // someFileName)
The FORTRAN 9000 manual says system() is a libU77 routine. We don't have to invoke a compiler directive, but we do have to link the library (though it may come in automatically). The only linker options I use regularly are
-lfsys -lm