]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/logical.rst
sphinx: copy files from texi2rst-generated repository
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / logical.rst
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 .. _logical:
7
8 LOGICAL --- Convert to logical type
9 ***********************************
10
11 .. index:: LOGICAL, conversion, to logical
12
13 .. function:: LOGICAL(L, KIND)
14
15 Converts one kind of ``LOGICAL`` variable to another.
16
17 :param L:
18 The type shall be ``LOGICAL``.
19
20 :param KIND:
21 (Optional) An ``INTEGER`` initialization
22 expression indicating the kind parameter of the result.
23
24 :return:
25 The return value is a ``LOGICAL`` value equal to :samp:`{L}`, with a
26 kind corresponding to :samp:`{KIND}`, or of the default logical kind if
27 :samp:`{KIND}` is not given.
28
29 Standard:
30 Fortran 90 and later
31
32 Class:
33 Elemental function
34
35 Syntax:
36 .. code-block:: fortran
37
38 RESULT = LOGICAL(L [, KIND])
39
40 See also:
41 :ref:`INT`,
42 :ref:`REAL`,
43 :ref:`CMPLX`