]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/isatty.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / isatty.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6.. index:: ISATTY, system, terminal
7
8.. _isatty:
9
10ISATTY --- Whether a unit is a terminal device
11**********************************************
12
13.. function:: ISATTY(UNIT)
14
15 Determine whether a unit is connected to a terminal device.
16
17 :param UNIT:
18 Shall be a scalar ``INTEGER``.
19
20 :return:
21 Returns ``.TRUE.`` if the :samp:`{UNIT}` is connected to a terminal
22 device, ``.FALSE.`` otherwise.
23
24 Standard:
25 GNU extension
26
27 Class:
28 Function
29
30 Syntax:
31 .. code-block:: fortran
32
33 RESULT = ISATTY(UNIT)
34
35 Example:
36 .. code-block:: fortran
37
38 PROGRAM test_isatty
39 INTEGER(kind=1) :: unit
40 DO unit = 1, 10
41 write(*,*) isatty(unit=unit)
42 END DO
43 END PROGRAM
44
45 See also:
3ed1b4ce 46 :ref:`TTYNAM`