]>
Commit | Line | Data |
---|---|---|
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 | .. _min: | |
7 | ||
8 | .. index:: MIN | |
9 | ||
10 | .. index:: MIN0 | |
11 | ||
12 | .. index:: AMIN0 | |
13 | ||
14 | .. index:: MIN1 | |
15 | ||
16 | .. index:: AMIN1 | |
17 | ||
18 | .. index:: DMIN1 | |
19 | ||
20 | .. index:: minimum value | |
21 | ||
22 | MIN --- Minimum value of an argument list | |
23 | ***************************************** | |
24 | ||
25 | .. function:: MIN(A1, A2 , A3, ...) | |
26 | ||
27 | Returns the argument with the smallest (most negative) value. | |
28 | ||
29 | :param A1: | |
30 | The type shall be ``INTEGER`` or | |
31 | ``REAL``. | |
32 | ||
33 | :param A2}, {A3}, ...: | |
34 | An expression of the same type and kind | |
35 | as :samp:`{A1}`. (As a GNU extension, arguments of different kinds are | |
36 | permitted.) | |
37 | ||
38 | :return: | |
39 | The return value corresponds to the minimum value among the arguments, | |
40 | and has the same type and kind as the first argument. | |
41 | ||
42 | Standard: | |
43 | Fortran 77 and later | |
44 | ||
45 | Class: | |
46 | Elemental function | |
47 | ||
48 | Syntax: | |
49 | .. code-block:: fortran | |
50 | ||
51 | RESULT = MIN(A1, A2 [, A3, ...]) | |
52 | ||
53 | Specific names: | |
54 | .. list-table:: | |
55 | :header-rows: 1 | |
56 | ||
57 | * - Name | |
58 | - Argument | |
59 | - Return type | |
60 | - Standard | |
61 | ||
62 | * - ``MIN0(A1)`` | |
63 | - ``INTEGER(4) A1`` | |
64 | - ``INTEGER(4)`` | |
65 | - Fortran 77 and later | |
66 | * - ``AMIN0(A1)`` | |
67 | - ``INTEGER(4) A1`` | |
68 | - ``REAL(4)`` | |
69 | - Fortran 77 and later | |
70 | * - ``MIN1(A1)`` | |
71 | - ``REAL A1`` | |
72 | - ``INTEGER(4)`` | |
73 | - Fortran 77 and later | |
74 | * - ``AMIN1(A1)`` | |
75 | - ``REAL(4) A1`` | |
76 | - ``REAL(4)`` | |
77 | - Fortran 77 and later | |
78 | * - ``DMIN1(A1)`` | |
79 | - ``REAL(8) A1`` | |
80 | - ``REAL(8)`` | |
81 | - Fortran 77 and later | |
82 | ||
83 | See also: | |
84 | :ref:`MAX`, | |
85 | :ref:`MINLOC`, | |
3ed1b4ce | 86 | :ref:`MINVAL` |