Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

CALL SYSTEM from Fortran

Jun
46
1
I found a problem with CALL SYSTEM from Fortran under Windows 7 64 bits.

The following small program:

call system('dir')
stop
end

shows the dir.

Under Windows XP 32 bits the directory shown is the current working directory (it is correct).

Under Windows 7 64 bits, the directory shown is the root directory n(it is a problem).

The same program shows the current working directory (the correct) when I run it from cmd.

Similar problems with other commands as delete, copy, etc.


Regards.
 
From: oph
| I found a problem with CALL SYSTEM from Fortran under Windows 7 64
| bits.
|
| The following small program:
|
| call system('dir')
| stop
| end
|
| shows the dir.
|
| Under Windows XP 32 bits the directory shown is the current working
| directory (it is correct).
|
| Under Windows 7 64 bits, the directory shown is the root directory
| n(it is a problem).
|
| The same program shows the current working directory (the correct)
| when I run it from cmd.
|
| Similar problems with other commands as delete, copy, etc.

I suspect that your TCSTART.BTM on Win7 contains a command to change directory, while the one on your WinXP system does not.
--
HTH, Steve
 
The last I knew (a long time ago) "system" (in "C") used CMD.EXE regardless of
%COMSPEC. Has that changed? Is it different with Fortran?

On Mon, 23 May 2011 09:19:19 -0400, Steve Fabian <> wrote:

|From: oph
|| I found a problem with CALL SYSTEM from Fortran under Windows 7 64
|| bits.
||
|| The following small program:
||
|| call system('dir')
|| stop
|| end
||
|| shows the dir.
||
|| Under Windows XP 32 bits the directory shown is the current working
|| directory (it is correct).
||
|| Under Windows 7 64 bits, the directory shown is the root directory
|| n(it is a problem).
||
|| The same program shows the current working directory (the correct)
|| when I run it from cmd.
||
|| Similar problems with other commands as delete, copy, etc.
|
|I suspect that your TCSTART.BTM on Win7 contains a command to change directory, while the one on your WinXP system does not.
 
From: vefatica
| The last I knew (a long time ago) "system" (in "C") used CMD.EXE
| regardless of
| %COMSPEC. Has that changed? Is it different with Fortran?

That would depend on the RTL used when linking. With an MS-supplied RTL I'd not be surprised the above to be true.
--
Steve
 

Similar threads

Back
Top