8.164 ISATTY — Whether a unit is a terminal device

Synopsis:

RESULT = ISATTY(UNIT)

Description:

Determine whether a unit is connected to a terminal device.

Class:

Function

Arguments:
UNITShall be a scalar INTEGER.
Return value:

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

Example:
PROGRAM test_isatty
  INTEGER(kind=1) :: unit
  DO unit = 1, 10
    write(*,*) isatty(unit=unit)
  END DO
END PROGRAM
Standard:

GNU extension

See also:

TTYNAM — Get the name of a terminal device