Printing From FORTRAN with Control Characters (35867)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 4.0
  • Microsoft FORTRAN Compiler for MS-DOS 4.01
  • 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 compiler for OS/2 4.1
  • Microsoft FORTRAN compiler for OS/2 5.0
  • Microsoft FORTRAN compiler for OS/2 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

This article was previously published under Q35867

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
				

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