Determine whether a unit is connected to a terminal device.
GNU extension
Function
RESULT = ISATTY(UNIT)
| UNIT | Shall be a scalar INTEGER. |
Returns .TRUE. if the UNIT is connected to a terminal device, .FALSE. otherwise.
PROGRAM test_isatty
INTEGER(kind=1) :: unit
DO unit = 1, 10
write(*,*) isatty(unit=unit)
END DO
END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gfortran/ISATTY.html