The information in this article applies to:
SUMMARYCare should be taken when using backslash (\) characters in strings passed to the SYSTEM and SPAWN functions. The SYSTEM and SPAWN functions are actually C routines. In C, the backslash character is used to denote an editing descriptor, somewhat similar to the way the I, F, X, etc., editing descriptors are used in the FORTRAN FORMAT statement. The following sample SYSTEM call incorrectly uses the backslash character:
No compile warnings are given, but a run-time error is produced because \t
is interpreted as an editing descriptor.
NOTE: Under Fortran PowerStation 4.0, a compiler warning is generated for the line above. The warning message is: The C function associated with the FORTRAN SYSTEM function will interpret the backslashes as editing descriptors. In C, if you want to print out a backslash you must follow the first backslash with another; this tells C to temporarily ignore the backslash as an editing descriptor. The following line demonstrates how to properly use the backslash character in the SYSTEM and SPAWN functions:
NOTE: In FORTRAN PowerStation, SYSTEMQQ is equivalent to SYSTEM.
Additional query words: kbinf 1.00 4.00 4.10 5.00 5.10
Keywords : kbFortranPS kbLangFortran |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |