Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

Calling a command file from within Visual Fortran

carl_berkowitz
Beginner
5,445 Views
I just came over to Windows FORTRAN from the UNIX side where we could call a text file with UNIX system commandsfrom within the FORTRAN code, e.g.,
istatus = system('sedfile')
where 'sedfile' would be a text file of UNIX commands (rm, ls, etc.) of the type we would enter from the screen prompt line. Is there an equivalent capability within Windows FORTRAN (using BASIC commands instead of UNIX, of course) to use system commands (e.g., dir) ? I can't track down the equivalent capability wihtin Compaq's Language Reference Manual but would think it a pretty standard tool for all flavors of FORTRAN.
Thanks much!
Carl
0 Kudos
25 Replies
sinereh_a_
Beginner
1,042 Views

I need to use "system" command for linking a FORTRAN code with another one. But I have a problem. I have attached a simple example in which It seems the command line "call system ('discrete2.f90')" does not run the other code at all. What shoud I do?

0 Kudos
Steven_L_Intel1
Employee
1,042 Views

What do you expect this to do? You're asking Windows to "run" a Fortran source file.

0 Kudos
sinereh_a_
Beginner
1,042 Views

oh ok I thought "system" is doing the same as "runqq". so that I should not use "system" for the same purpose. thanks.

 

0 Kudos
Steven_L_Intel1
Employee
1,042 Views

It is very similar, but the same issue applies. You can't "run" a .f90 file.

0 Kudos
sinereh_a_
Beginner
1,042 Views

Thanks so much for your reply. The problem I was concerned about is now solved. 

0 Kudos
Reply