TTYNAM — Get the name of a terminal device.¶
- TTYNAM()¶
Get the name of a terminal device. For more information, see
ttyname(3)
.- Parameters
UNIT – Shall be a scalar
INTEGER
.NAME – Shall be of type
CHARACTER
.
Standard:
GNU extension
Class:
Subroutine, function
Syntax:
CALL TTYNAM(UNIT, NAME) NAME = TTYNAM(UNIT)
Example:
PROGRAM test_ttynam INTEGER :: unit DO unit = 1, 10 IF (isatty(unit=unit)) write(*,*) ttynam(unit) END DO END PROGRAM
See also:
ISATTY