PRB: SYSTEM Function Ignores SET string=string Command (49921)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 4.1
  • Microsoft FORTRAN Compiler for MS-DOS 5.0
  • Microsoft FORTRAN Compiler for MS-DOS 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS 1.0
  • Microsoft FORTRAN PowerStation for MS-DOS 1.0a
  • Microsoft Fortran Powerstation 32 for Windows NT 1.0
  • Microsoft Fortran Powerstation 32 for Windows NT 4.0
  • Microsoft FORTRAN compiler for OS/2 4.1
  • Microsoft FORTRAN compiler for OS/2 5.0
  • Microsoft FORTRAN compiler for OS/2 5.1

This article was previously published under Q49921

SYMPTOMS

An attempt to issue the "SET string=string" command with the SYSTEM function in the FORTRAN run-time library fails to change the environment.

RESOLUTION

This behavior is expected. The SYSTEM command cannot modify the system environment.

MORE INFORMATION

The following code example demonstrates this situation. The environment does not change.

Sample Code

C Compile options needed: None

      INTERFACE TO FUNCTION SYSTEM[C] (STRING)
      INTEGER*2 SYSTEM
      CHARACTER*1 STRING[REFERENCE]
      END

      INTEGER*2 SYSTEM
      I = SYSTEM('SET CL=/FPi /Lr'C)
      END
				

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbLangFortran KB49921