TTYNAM(3f)

DESCRIPTION
Get the name of a terminal device. For more information, see ttyname(3).

This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.

STANDARD
GNU extension

CLASS
Subroutine, function

SYNTAX

CALL TTYNAM(UNIT, NAME) NAME = TTYNAM(UNIT)

ARGUMENTS

UNIT Shall be a scalar INTEGER. NAME Shall be of type CHARACTER.

EXAMPLE
          PROGRAM test_ttynam
            INTEGER :: unit
            DO unit = 1, 10
              IF (isatty(unit=unit)) write(*,*) ttynam(unit)
            END DO
          END PROGRAM

SEE ALSO
ISATTY

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).