Printing From FORTRAN with Control Characters

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
  kbpring

The information in this article applies to:

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: kbpring KBSubcategory: FORTLngIss
Keywords          : kbcode kbFortranPS kbLangFortran 
Version           : 4.00 4.01 4.10 5.00 5.10 1.00 1.
Platform          : MS-DOS OS/2 WINDOWS

Last Reviewed: May 23, 1998