I wonder if the "SYSTEM" you have to use is called as a function or as a
subroutine. Your documentation ought to say. In the Lahey LF95, it is a
subroutine call. From their documentation:
CALL SYSTEM (cmd, dosbox, spawn)
Required Arguments
cmd must be of type CHARACTER. It is an INTENT(IN) argument
that
is a system command that is to be executed as if it were typed
on the system command line.
Optional Arguments
dosbox must be of type LOGICAL. It is an INTENT(IN) argument
that has the value true if a new DOS box is to be opened
(required for internal commands like DIR) and false otherwise.
By default, dosbox has the value true.
spawn must be of type LOGICAL. It is an INTENT(IN) argument
that has the value true if the command or program to be
executed
is to be spawned as a separate process and false otherwise.
By default, spawn has the value false.
While your compiler's implementation likely is not the same, the above
may give you some ideas as to what is wrong in your testing.
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf
Of Ben Blackwell
Sent: Thursday, December 29, 2005 3:10 PM
To: [log in to unmask]
Subject: Re: spawing other jobs from within F90 code
I started the test program in a cygwin (unix/linux emulator) window and
the command "ls -l" gives the long listing of the files/directories. I
had already tried "test = system('dir')" from within a dos (cmd) window
and while no error messages were generated, the dos command 'dir' was
not performed.
Thanks,
Ben
-----------------------------------------
*****************Internet Email Confidentiality
Footer******************
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or
deliver
this message to anyone. In such case, you should destroy this message
and notify the sender by reply email. Please advise immediately if you
or your employer do not consent to Internet email for messages of this
kind. Opinions, conclusions and other information in this message that
do not relate to the official business of The Shaw Group Inc. or its
subsidiaries shall be understood as neither given nor endorsed by it.
_______________________________________________________________________
_
The Shaw Group Inc.
http://www.shawgrp.com
|