ISATTY — Whether a unit is a terminal device#

ISATTY(UNIT)#

Determine whether a unit is connected to a terminal device.

Parameters:

UNIT – Shall be a scalar INTEGER.

Returns:

Returns .TRUE. if the UNIT is connected to a terminal device, .FALSE. otherwise.

Standard:

GNU extension

Class:

Function

Syntax:
RESULT = ISATTY(UNIT)
Example:
PROGRAM test_isatty
  INTEGER(kind=1) :: unit
  DO unit = 1, 10
    write(*,*) isatty(unit=unit)
  END DO
END PROGRAM
See also:

TTYNAM — Get the name of a terminal device