Printing From FORTRAN with Control Characters

Last reviewed: March 18, 1997
Article ID: Q35867
4.00 4.01 4.10 5.00 5.10 1.00 1.00a | 4.10 5.00 5.10 | 1.00 4.00
MS-DOS                              | OS/2           | WINDOWS NT
kbprg kbcode kbpring

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 1.0 and 4.0

SUMMARY

In Microsoft FORTRAN, an application can send control characters directly to a printer with out printing them by using the CHAR intrinsic function.

MORE INFORMATION

The following code example prints the word "Hello," sends a form feed character (ASCII 12) to the printer, then prints the word "World."

Sample Code

C Compiler options required: None

      OPEN(6, FILE = 'LPT1', STATUS = 'OLD')
      WRITE(6, *) 'HELLO'
      WRITE(6, *) CHAR(12)
      WRITE(6, *) 'WORLD'
      END


Additional reference words: kbinf 1.00 4.00 4.01 4.10 5.00 5.10
KBCategory: kbprg kbpring kbcode
KBSubcategory: FORTLngIss
Keywords : FORTLngIss
Version : 4.00 4.01 4.10 5.00 5.10 1.00 1.
Platform : MS-DOS OS/2 WINDOWS
Resolution Type : kbcode


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.