The information in this article applies to:
SUMMARYWhen an application sends uses formatted I/O and a FORMAT specifier to send a record to a device, FORTRAN interprets the first character of the record as a carriage-control character, as follows:
FORTRAN ignores the carriage-control character "1" for screen I/O.
Applications commonly specify carriage control as the first character of the FORMAT specifier. However, when an application sends the output to a disk file (rather than sending the output directly to a device), the application places the literal character into the file and does not place any carriage-control information into the file. If you copy the file to the printer, no carriage control occurs. MORE INFORMATIONMicrosoft FORTRAN recognizes the following list of devices.
Microsoft FORTRAN version 5.1 also recognizes the following devices.
To use carriage control in text sent to a file, the application must
explicitly write the carriage-control characters to the file. The following
code example sends a form-feed character directly to a printer, but not to
a file.
Sample Code #1
The output to the TEST.DAT file is as follows:
1 This follows the 1 The following code example sends a form-feed character to both the printer and to the file using the CHAR() intrinsic function. Sample Code #2
Note that the code uses a 1X format character to skip the carriage control
field for output sent to the printer. Otherwise, the CHAR(12) character
would be interpreted as a blank carriage-control character. In the output
to the file, this step is not required because the CHAR(12) is desired in
the file as a form-feed character.
In list-directed I/O (the "*" format), the first character of a record is not interpreted as a carriage-control character. Additional query words: kbinf 3.20 3.30 3.31 4.00 4.01 4.10 5.00 nofps 5.10
Keywords : |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |