2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: ISATTY, system, terminal
10 ISATTY --- Whether a unit is a terminal device
11 **********************************************
13 .. function:: ISATTY(UNIT)
15 Determine whether a unit is connected to a terminal device.
18 Shall be a scalar ``INTEGER``.
21 Returns ``.TRUE.`` if the :samp:`{UNIT}` is connected to a terminal
22 device, ``.FALSE.`` otherwise.
31 .. code-block:: fortran
36 .. code-block:: fortran
39 INTEGER(kind=1) :: unit
41 write(*,*) isatty(unit=unit)