]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/radix.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / radix.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 .. index:: RADIX, model representation, base, model representation, radix
7
8 .. _radix:
9
10 RADIX --- Base of a model number
11 ********************************
12
13 .. function:: RADIX(X)
14
15 ``RADIX(X)`` returns the base of the model representing the entity :samp:`{X}`.
16
17 :param X:
18 Shall be of type ``INTEGER`` or ``REAL``
19
20 :return:
21 The return value is a scalar of type ``INTEGER`` and of the default
22 integer kind.
23
24 Standard:
25 Fortran 90 and later
26
27 Class:
28 Inquiry function
29
30 Syntax:
31 .. code-block:: fortran
32
33 RESULT = RADIX(X)
34
35 Example:
36 .. code-block:: fortran
37
38 program test_radix
39 print *, "The radix for the default integer kind is", radix(0)
40 print *, "The radix for the default real kind is", radix(0.0)
41 end program test_radix
42
43 See also:
44 :ref:`SELECTED_REAL_KIND`