The Intel run-time library actually provides these routines in two places, the IFPOSIX Posix-compliant library and the portabiliy library module IFPORT (under the names isatty and ttynam).
GetConsoleTitle (apparently Windows is moving away from their Console API and the usage of virtual terminal sequences is preferred for new development for portability reasons)
Other possible enhancements could include functions to query the size of the terminal (an example can be found in @zbeekman's zstdlib project).
Suggested by @14NGiestas in https://github.com/fortran-lang/stdlib/issues/193#issuecomment-688464019
Many compilers already have their own extensions for this:
isatty
PXFISATTY
isatty
isatty
Corresponding routines to query the terminal name:
ttynam
PXFTTYNAM
ttynam
ttynam
The Intel run-time library actually provides these routines in two places, the
IFPOSIX
Posix-compliant library and the portabiliy library moduleIFPORT
(under the namesisatty
andttynam
).Linux man pages:
isatty
ttyname
Windows:
_isatty
GetConsoleTitle
(apparently Windows is moving away from their Console API and the usage of virtual terminal sequences is preferred for new development for portability reasons)Other possible enhancements could include functions to query the size of the terminal (an example can be found in @zbeekman's
zstdlib
project).