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:: TTYNAM, system, terminal
10 TTYNAM --- Get the name of a terminal device
11 ********************************************
13 .. function:: TTYNAM(UNIT)
15 Get the name of a terminal device. For more information,
19 Shall be a scalar ``INTEGER``.
22 Shall be of type ``CHARACTER``.
31 .. code-block:: fortran
33 CALL TTYNAM(UNIT, NAME)
37 .. code-block:: fortran
42 IF (isatty(unit=unit)) write(*,*) ttynam(unit)