Compaq Fortran for Tru64 UNIX Alpha Systems V5.4
ttynam, isatty (3f)
finds the name of a terminal port
Syntax
integer*4 lunit
character*len pathname
external ttynam
call ttynam ( lunit, pathname )
logical*4 isatty, flag
integer*4 lunit
external isatty
flag = isatty ( lunit )
Description
The ttynam subroutine writes the blank-padded pathname of the terminal
device associated with the specified logical unit lunit. If the pathname
variable is not large enough to hold the entire path, the path is
truncated.
The isatty function returns .TRUE. if the specified lunit is associated
with a terminal device; otherwise, it returns .FALSE..
Diagnostics
The ttynam subroutine writes an empty string (all blanks) if the specified
lunit is not associated with a terminal device in the /dev directory.
If an error occurs during the ttynam subroutine, you can use errsns to get
the Fortran error generated.