TTYNAM
— Get the name of a terminal device.ttyname(3)
. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.
CALL TTYNAM(UNIT, NAME) |
NAME = TTYNAM(UNIT) |
UNIT | Shall be a scalar INTEGER . |
NAME | Shall be of type CHARACTER . |
PROGRAM test_ttynam INTEGER :: unit DO unit = 1, 10 IF (isatty(unit=unit)) write(*,*) ttynam(unit) END DO END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/TTYNAM.html