Statement: Displays output on the screen. TYPE is a synonym for PRINT. All forms and rules for the PRINT statement also apply to the TYPE statement.
The PRINT statement is the same as a formatted, sequential WRITE statement, except that the PRINT statement must never transfer data to user-specified I/O units.
A PRINT statement takes one of the following forms:
Syntax
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: PUTC, READ, WRITE, FORMAT, Data Transfer I/O Statements, File Operation I/O Statements
Examples
In the following example, one record (containing four fields of data) is printed to the implicit output device:
CHARACTER*16 NAME, JOB
PRINT 400, NAME, JOB
400 FORMAT ('NAME=', A, 'JOB=', A)
The following shows another example:
! The following statements are equivalent:
PRINT '(A11)', 'Abbottsford'
WRITE (*, '(A11)') 'Abbottsford'
TYPE '(A11)', 'Abbottsford'