CALL SYSTEM from Fortran

oph

Jun 28, 2008
44
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
 
May 20, 2008
11,400
99
Syracuse, NY, USA
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
Thread starter Title Forum Replies Date
jdanielp Cannot step into and/or call another .bat file when debugging .bat file Support 2
EDerH Powershell call from script Support 24
S Debugger Bat file call history Support 9
F Powershell call fails with "Scripting Integrator 2016 (PowerShell)" license error Support 9
M Call History popup-window? Support 0
nickles Call a complex function Support 13
rconn News Take Command v19 Call for Features Support 0
cgunhouse Problem with CALL and Directory Aliases in V17 Support 9
Vasilich How to? debugging files that use CALL command - possible?? Support 3
noahcoad Option to always CALL? Support 4
M @ExecStr vs. Call Support 4
rconn Last call for v12 feature requests Support 59
rconn Call for v11 feature requests Support 35
p.f.moore Running another batch file without CALL Support 7
C old .vs. new system Support 0
Jay Sage Insufficient System Resources Support 1
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
M Problems with @REGBREAD on remote system Support 4
C "Failed to update the system registry. Please try using REGEDIT" Support 3
vefatica File system update after DEL? Support 4
vefatica @PID and system processes? Support 3
Patulus TCHistoryLog: TCC: (Sys) The system cannot find the path specified Support 15
J Documentation New help system: "skip word list" Support 11
vefatica New help system Support 14
H Fixed ... MSVCR120.dll is missing from your system ... Support 2
Daniel P How to Purchase a Multi-System License for TCC? Support 2
Emilio III 1 System license (literally?) Support 3
Steve Pitts Insufficient system resources exist to complete the requested service Support 1
A How to? Can't change directory ("cd") into system hidden files Support 13
R WAD issue with filename completion with system and hidden files Support 8
D Individual vs multi-system licenses Support 1
S Your system (homepage) blocks my IP! Support 4
M And oddity re the 32-bit TCC on a 64-bit system... Support 4
Phileosophos How to? The help system redirects to the index page Support 4
C How to determine if system is 32 or 64 bit? Support 5
vefatica @PID, ISAPP - don't see system processes Support 12
L File association: System cannot find the associated program Support 30
gschizas View uses Windows-1252 codepage instead of System codepage Support 4
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
R Delete command sets directory attributes to hidden & system Support 46
S Need help to execute TCC commands on another system Support 6
fpefpe Registry as file system Support 20
D System Error: A required privilege is not held by the client. Support 4
J 4NT Error when running 'system' from a program to execute a .BTM Support 3
U Installing the Compaq Visual Fortran 6.0 compiler using Take Command Support 8

Similar threads