1!**************************************************************************************
2!
3! This file is part of FortranProject plugin for Code::Blocks IDE.
4! It contains list of keywords and intrinsic procedures which are included in code-completion list.
5!
6! Description of procedures is based on GNU Fortran user manual.
7!
8! The file is licensed under the GNU General Public License, version 3
9! http://www.gnu.org/licenses/gpl-3.0.html
10!
11! Author: Darius Markauskas
12!
13!**************************************************************************************
14
15function list_of_other_fortran_keywords()
16	! This pseudo function contains fortran keywords, which should be included in code-completion list, but
17	! they are not functions or subroutines. The keywords are defined as variables of the type 'other'.
18	type(other) :: access, action, advance, allocatable, allocate, &
19                apostrophe, assign, assignment, associate, asynchronous, backspace, &
20                bind, blank, blockdata, call, case, character, class, close, common, &
21                complex, contains, continue, cycle, data, deallocate, decimal, delim, &
22                default, dimension, direct, do, double, doubleprecision, else, &
23                elseif, elsewhere, encoding, end, endassociate, endblockdata, enddo, &
24                endfile, endforall, endfunction, endif, endinterface, endmodule, endprocedure, endprogram, &
25                endselect, endsubroutine, endtype, endwhere, entry, eor, equivalence, &
26                err, errmsg, exist, exit, external, final, file, flush, fmt, forall, form, format, &
27                formatted, function, go, goto, if, implicit, in, include, inout, &
28                integer, inquire, intent, interface, intrinsic, iomsg, iolength, &
29                iostat, kind, len, logical, module, named, namelist, nextrec, nml, &
30                none, nopass, nullify, number, only, open, opened, operator, optional, out, pad, &
31                parameter, pass, pending, pointer, pos, position, precision, &
32                print, private, program, protected, public, quote, read, readwrite, &
33                real, rec, recl, recursive, result, return, rewind, save, select, &
34                selectcase, selecttype, sequential, stat, status, stop, stream, &
35                subroutine, target, then, to, type, unformatted, unit, use, value, &
36                volatile, wait, where, while, write, procedure, elemental, pure, sequence, &
37                import, is, &
38                null, new_line,  block, abstract, delegate, static, reference, round, &
39                decorate, extends, generic, non_overridable, enum, endenum, enumerator, typealias, &
40                submodule, endsubmodule, concurrent, contiguous, endblock, non_intrinsic, codimension, &
41                impure, critical, endcritical, lock, unlock, error, sync, all, memory, images, deferred, &
42                fail, image, event, post, wait, change, team, endteam, non_recursive
43
44end function
45
46
47!**************************************************************************************
48!
49! List of intrinsic procedures
50!
51!**************************************************************************************
52
53function ABS(A)
54    ! Computes the absolute value of A.
55    ! Arguments:
56    ! A   -The type of the argument shall be an INTEGER, REAL, or COMPLEX.
57    integer, real, complex :: A
58end function
59
60character function ACHAR(I [, KIND])
61    ! Returns the character located at position 'i' in the ASCII collating sequence.
62    ! Syntax: RESULT = ACHAR(I [, KIND])
63    ! Arguments:
64    ! i   -The type shall be INTEGER.
65    ! KIND (Optional) An INTEGER initialization expression indicating the kind parameter of the result.
66    ! Return value:
67    ! The return value is of type CHARACTER with a length of one.
68    ! If the KIND argument is present, the return value is of the specified kind and of the default kind otherwise.
69    ! Standard: Fortran 77 and later, with KIND argument Fortran 2003 and later.
70    integer :: I, KIND
71end function
72
73function ACOS(X)
74    ! Computes the arccosine of X (inverse of COS(X)).
75    ! Arguments: X 	-The type shall either be REAL with a magnitude that is less than or equal to one - or the type shall be COMPLEX.
76    ! Return value:
77    ! The return value is of the same type and kind as X. The real part of the result
78    ! is in radians and lies in the range 0 <= acos(x) <= pi.
79    ! Standard: Fortran 77 and later, for a complex argument Fortran 2008 or later
80    real, complex :: ACOS, X
81end function
82
83double precision function DACOS(X)
84    ! This is specific procedure name of ACOS function.
85    ! Computes the arccosine of X (inverse of COS(X)).
86    ! Arguments: X 	-The type shall be DOUBLEPRECISION.
87    ! Return value:
88    ! The return value is of the same type and kind as X. The real part of the result
89    ! is in radians and lies in the range 0 <= acos(x) <= pi.
90    ! Standard: Fortran 77 and later
91    double precision :: X
92end function
93
94function ACOSH(X)
95    ! Computes the hyperbolic arccosine of X (inverse of COSH(X)).
96    ! Syntax: RESULT = ACOSH(X)
97    ! Arguments: X 	-The type shall be REAL or COMPLEX.
98    ! Return value:
99    ! The return value has the same type and kind as X. If X is complex, the imaginary part of the result is in radians
100    ! and lies between 0 <= acosh(x) <= pi.
101    ! Standard: Fortran 2008 and later.
102    real, complex :: ACOSH, X
103end function
104
105character(len=*) function ADJUSTL(STRING)
106    ! ADJUSTL(STRING) will left adjust a string by removing leading spaces.
107    ! Spaces are inserted at the end of the string as needed.
108    ! Arguments: STRING  -The type shall be CHARACTER.
109    ! Standard: Fortran 90 and later.
110    character(len=*) :: STRING
111end function
112
113character(len=*) function ADJUSTR(STRING)
114    ! ADJUSTR(STRING) will right adjust a string by removing trailing spaces. Spaces are inserted at the start
115    ! of the string as needed.
116    ! Arguments: STRING  -The type shall be CHARACTER.
117    ! Standard: Fortran 95 and later.
118    character(len=*) :: STRING
119end function
120
121real(kind as Z) function AIMAG(Z)
122    ! AIMAG(Z) yields the imaginary part of complex argument Z.
123    ! Arguments: Z 	-The type of the argument shall be COMPLEX.
124    ! Return value: The return value is of type REAL with the kind type parameter of the argument.
125    ! Standard: Fortran 77 and later
126    complex :: Z
127end function
128
129real function AINT(A [, KIND])
130    ! Real value truncated to a whole number.
131    ! Return the largest whole number whose magnitude is less than or equal to |A|
132    ! and whose sign is the same as A.
133    real :: A
134    integer :: KIND
135end function
136
137double precision function DINT(A)
138    ! Real value truncated to a whole number.
139    ! Return the largest whole number whose magnitude is less than or equal to |A|
140    ! and whose sign is the same as A.
141    double precision :: A
142end function
143
144logical function ALL(MASK [, DIM])
145    ! Determines if all the values are true in MASK in the array along dimension DIM.
146    ! Arguments:
147    ! MASK 	-The type of the argument shall be LOGICAL and it shall not be scalar.
148    ! DIM 	-(Optional) DIM shall be a scalar integer with a value that lies between one and the rank of MASK.
149    ! Return value:
150    ! ALL(MASK) returns a scalar value of type LOGICAL where the kind type parameter is the same as the kind type
151    !    parameter of MASK. If DIM is present, then ALL(MASK, DIM) returns an array with the rank of
152    !    MASK minus 1. The shape is determined from the shape of MASK where the DIM dimension is elided.
153    ! (A)
154    !   ALL(MASK) is true if all elements of MASK are true. It also is true if MASK has zero size; otherwise, it is false.
155    ! (B)
156    !   If the rank of MASK is one, then ALL(MASK,DIM) is equivalent to ALL(MASK). If the rank is greater than one,
157    !   then ALL(MASK,DIM) is determined by applying ALL to the array sections.
158    ! Standard: Fortran 95 and later.
159    logical :: MASK(:[,...])
160    integer :: DIM
161end function
162
163logical function ALLOCATED(ARRAY)
164    ! Checks the status of whether X is allocated.
165    ! Arguments:
166    ! ARRAY  -The argument shall be an ALLOCATABLE array.
167    ! Return value:
168    ! The return value is a scalar LOGICAL with the default logical kind type parameter.
169    ! If ARRAY is allocated, ALLOCATED(ARRAY) is .TRUE.; otherwise, it returns .FALSE.
170    ! Standard: Fortran 95 and later.
171    type(any_allocatable_array) :: ARRAY
172end function
173
174real function ANINT(A [, KIND])
175    ! Rounds its argument to the nearest whole number.
176    ! Arguments:
177    ! A   -The type of the argument shall be REAL.
178    ! KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
179    ! Return value:
180    ! The return value is of type real with the kind type parameter of the argument if the optional KIND is absent;
181    ! otherwise, the kind type parameter will be given by KIND. If A is greater than zero, ANINT(A) returns AINT(X+0.5).
182    ! If A is less than or equal to zero then it returns AINT(X-0.5).
183    ! Standard: Fortran 77 and later.
184    real :: A
185    integer :: KIND
186end function
187
188double precision function DNINT(A)
189    ! Rounds its argument to the nearest whole number.
190    ! Arguments:
191    ! A   -The type of the argument shall be DOUBLE PRECISION.
192    ! Return value:
193    ! The return value is of type real with the kind type parameter of the argument if the optional KIND is absent;
194    ! otherwise, the kind type parameter will be given by KIND. If A is greater than zero, ANINT(A) returns AINT(X+0.5).
195    ! If A is less than or equal to zero then it returns AINT(X-0.5).
196    ! Standard: Fortran 77 and later.
197    double precision :: A
198end function
199
200logical function ANY(MASK [, DIM])
201    ! Determines if any of the values in the logical array MASK along dimension DIM are .TRUE..
202    ! Arguments:
203    ! MASK   -The type of the argument shall be LOGICAL and it shall not be scalar.
204    ! DIM  -(Optional) DIM shall be a scalar integer with a value that lies between one and the rank of MASK.
205    ! Return value:
206    ! ANY(MASK) returns a scalar value of type LOGICAL where the kind type parameter is the same as the kind type
207    ! parameter of MASK. If DIM is present, then ANY(MASK, DIM) returns an array with the rank of MASK minus 1.
208    ! The shape is determined from the shape of MASK where the DIM dimension is elided.
209    ! (A)
210    !   ANY(MASK) is true if any element of MASK is true; otherwise, it is false. It also is false if MASK has zero size.
211    ! (B)
212    !   If the rank of MASK is one, then ANY(MASK,DIM) is equivalent to ANY(MASK). If the rank is greater than one,
213    !   then ANY(MASK,DIM) is determined by applying ANY to the array sections.
214    ! Standard: Fortran 95 and later.
215    logical :: MASK(:[,...])
216    integer :: DIM
217end function
218
219function ASIN(X)
220    ! Computes the arcsine of its X (inverse of SIN(X)).
221    ! Arguments:
222    ! X   -The type shall be either REAL and a magnitude that is less than or equal to one - or be COMPLEX.
223    ! Return value:
224    ! The return value is of the same type and kind as X. The real part of the result is in radians and
225    ! lies in the range -pi/2 <= asin(x) <= pi/2.
226    ! Standard: Fortran 77 and later, for a complex argument Fortran 2008 or later.
227    real, complex :: ASIN, X
228end function
229
230function DASIN(X)
231    ! This is specific name of ASIN function.
232    ! Computes the arcsine of its X (inverse of SIN(X)).
233    ! Arguments:
234    ! X   -The type shall be DOUBLE PRECISION and a magnitude that is less than or equal to one.
235    ! Return value:
236    ! The return value is of the same type and kind as X. The real part of the result is in radians and
237    ! lies in the range -pi/2 <= asin(x) <= pi/2.
238    ! Standard: Fortran 77 and later
239    double precision :: DASIN, X
240end function
241
242function ASINH(X)
243    ! Computes the hyperbolic arcsine of X (inverse of SINH(X)).
244    ! Arguments:
245    ! X     -The type shall be REAL or COMPLEX.
246    ! Return value:
247    ! The return value is of the same type and kind as X. If X is complex, the imaginary part of the result
248    ! is in radians and lies between -pi/2 <= asinh(x) <= pi/2.
249    ! Standard: Fortran 2008 and later
250    real, complex :: ASINH, X
251end function
252
253logical function ASSOCIATED(POINTER [, TARGET])
254    ! Determines the status of the pointer POINTER or if POINTER is associated with the target TARGET.
255    ! Arguments:
256    ! POINTER 	-POINTER shall have the POINTER attribute and it can be of any type.
257    ! TARGET    -(Optional) TARGET shall be a pointer or a target. It must have the same type,
258    !            kind type parameter, and array rank as POINTER.
259    ! The association status of neither POINTER nor TARGET shall be undefined.
260    ! Return value:
261    ! ASSOCIATED(POINTER) returns a scalar value of type LOGICAL(4). There are several cases:
262    ! (A) When the optional TARGET is not present then
263    !     ASSOCIATED(POINTER) is true if POINTER is associated with a target; otherwise, it returns false.
264    ! (B) If TARGET is present and a scalar target, the result is true if
265    !     TARGET is not a zero-sized storage sequence and the target associated with POINTER occupies
266    !     the same storage units. If POINTER is disassociated, the result is false.
267    !(C) If TARGET is present and an array target, the result is true if
268    !     TARGET and POINTER have the same shape, are not zero-sized arrays, are arrays whose elements
269    !     are not zero-sized storage sequences, and TARGET and POINTER occupy the same storage units
270    !     in array element order. As in case(B), the result is false, if POINTER is disassociated.
271    !(D) If TARGET is present and an scalar pointer, the result is true
272    !    if TARGET is associated with POINTER, the target associated with TARGET are not zero-sized storage
273    !    sequences and occupy the same storage units. The result is false, if either TARGET or POINTER is disassociated.
274    !(E) If TARGET is present and an array pointer, the result is true if
275    !    target associated with POINTER and the target associated with TARGET have the same shape,
276    !    are not zero-sized arrays, are arrays whose elements are not zero-sized storage sequences, and TARGET
277    !    and POINTER occupy the same storage units in array element order. The result is false, if either TARGET
278    !    or POINTER is disassociated.
279    ! Standard: Fortran 95 and later
280    type(any_pointer) :: POINTER, TARGET
281end function
282
283function ATAN(X)
284    ! Computes the arctangent of X.
285    ! Syntax:
286    ! RESULT = ATAN(X) RESULT = ATAN(Y, X)
287    ! Arguments:
288    ! X  -The type shall be REAL or COMPLEX; if Y is present, X shall be REAL.
289    ! Y  -shall be of the same type and kind as X.
290    ! Return value:
291    ! The return value is of the same type and kind as X. If Y is present, the result is identical to ATAN2(Y,X).
292    ! Otherwise, it the arcus tangent of X, where the real part of the result is in radians and lies
293    ! in the range -pi/2 <= atan(x) <= pi/2.
294    ! Standard: Fortran 77 and later, for a complex argument and for two arguments Fortran 2008 or later.
295    real, complex :: ATAN, X
296end function
297
298function DATAN(X)
299    ! This is specific name of function ATAN.
300    ! Computes the arctangent of X.
301    ! Arguments:
302    ! X  -The type shall be DOUBLE PRECISION
303    ! Return value:
304    ! The return value is of the same type and kind as X. If Y is present, the result is identical to ATAN2(Y,X).
305    ! Otherwise, it the arcus tangent of X, where the real part of the result is in radians and lies
306    ! in the range -pi/2 <= atan(x) <= pi/2.
307    ! Standard: Fortran 77 and later
308    double precision :: DATAN, X
309end function
310
311real function ATAN2(Y, X)
312    ! Computes the principal value of the argument function of the complex number X + i Y.
313    ! This function can be used to transform from carthesian into polar coordinates and allows to determine
314    ! the angle in the correct quadrant.
315    ! Arguments:
316    ! Y   -The type shall be REAL.
317    ! X   -The type and kind type parameter shall be the same as Y. If Y is zero, then X must be nonzero.
318    ! Return value:
319    ! The return value has the same type and kind type parameter as Y. It is the principal value of the complex
320    ! number X + i Y. If X is nonzero, then it lies in the range -pi <= atan(x) <= pi. The sign is positive
321    ! if Y is positive. If Y is zero, then the return value is zero if X is positive and \pi if X is negative.
322    ! Finally, if X is zero, then the magnitude of the result is pi/2.
323    ! Standard: Fortran 77 and later.
324    real :: Y, X
325end function
326
327double precision function DATAN2(Y, X)
328    ! This is specific name of ATAN2 function.
329    ! Computes the principal value of the argument function of the complex number X + i Y.
330    ! This function can be used to transform from carthesian into polar coordinates and allows to determine
331    ! the angle in the correct quadrant.
332    ! Arguments:
333    ! Y   -The type shall be DOUBLE PRECISION.
334    ! X   -The type and kind type parameter shall be the same as Y. If Y is zero, then X must be nonzero.
335    ! Return value:
336    ! The return value has the same type and kind type parameter as Y. It is the principal value of the complex
337    ! number X + i Y. If X is nonzero, then it lies in the range -pi <= atan(x) <= pi. The sign is positive
338    ! if Y is positive. If Y is zero, then the return value is zero if X is positive and \pi if X is negative.
339    ! Finally, if X is zero, then the magnitude of the result is pi/2.
340    ! Standard: Fortran 77 and later.
341    DOUBLE PRECISION :: Y, X
342end function
343
344function ATANH(X)
345    ! Computes the hyperbolic arctangent of X (inverse of TANH(X)).
346    ! Arguments:
347    ! X  -The type shall be REAL or COMPLEX.
348    ! Return value:
349    ! The return value has same type and kind as X. If X is complex, the imaginary part of the result is
350    ! in radians and lies between -pi/2 <= atanh(x) <= pi/2.
351    ! Standard: Fortran 2008 and later.
352    real, complex :: ATANH, X
353end function
354
355real function BESSEL_J0(X)
356    ! Computes the Bessel function of the first kind of order 0 of X.
357    ! Arguments:
358    ! X   -The type shall be REAL, and it shall be scalar.
359    ! Return value:
360    ! The return value is of type REAL and lies in the range - 0.4027... <= Bessel(0,x) <= 1.
361    ! It has the same kind as X.
362    ! Standard: Fortran 2008 and later.
363    real :: X
364end function
365
366real function BESSEL_J1(X)
367    ! Computes the Bessel function of the first kind of order 1 of X.
368    ! Arguments:
369    ! X    -The type shall be REAL, and it shall be scalar.
370    ! Return value:
371    ! The return value is of type REAL and it lies in the range -0.5818... <= Bessel(0,x) <= 0.5818 .
372    ! It has the same kind as X.
373    ! Standard: Fortran 2008 and later.
374    real :: X
375end function
376
377real function BESSEL_JN(N, X)
378    ! Computes the Bessel function of the first kind of order N of X.
379    ! Arguments:
380    ! N  -Shall be a scalar or an array of type INTEGER.
381    ! X  -Shall be a scalar or an array of type REAL.
382    ! Return value:
383    ! The return value is a scalar of type REAL. It has the same kind as X.
384    ! Standard: Fortran 2008 and later.
385    integer :: N
386    real :: X
387end function
388
389real function BESSEL_Y0(X)
390    ! Computes the Bessel function of the second kind of order 0 of X.
391    ! Arguments:
392    ! X  -The type shall be REAL, and it shall be scalar.
393    ! Return value:
394    ! The return value is a scalar of type REAL. It has the same kind as X.
395    ! Standard: Fortran 2008 and later.
396    real :: X
397end function
398
399real function BESSEL_Y1(X)
400    ! Computes the Bessel function of the second kind of order 1 of X.
401    ! Arguments:
402    ! X  -The type shall be REAL, and it shall be scalar.
403    ! Return value:
404    ! The return value is a scalar of type REAL. It has the same kind as X.
405    ! Standard: Fortran 2008 and later.
406    real :: X
407end function
408
409real function BESSEL_YN(N, X)
410    ! Computes the Bessel function of the second kind of order N of X.
411    ! Arguments:
412    ! N  -Shall be a scalar or an array of type INTEGER.
413    ! X  -Shall be a scalar or an array of type REAL.
414    ! If both arguments are arrays, their ranks and shapes shall conform.
415    ! Return value:
416    ! The return value is a scalar of type REAL. It has the same kind as X.
417    integer :: N
418    real :: X
419end function
420
421integer function BIT_SIZE(I)
422    ! Returns the number of bits (integer precision plus sign bit) represented by the type of I.
423    ! The result of BIT_SIZE(I) is independent of the actual value of I.
424    ! Arguments:
425    ! I  -The type shall be INTEGER.
426    ! Return value:
427    ! The return value is of type INTEGER.
428    ! Standard: Fortran 95 and later.
429    integer :: I
430end function
431
432logical function BTEST(I, POS)
433    ! Returns logical .TRUE. if the bit at POS in I is set. The counting of the bits starts at 0.
434    ! Arguments:
435    ! I  -The type shall be INTEGER.
436    ! POS  -The type shall be INTEGER.
437    ! Return value:
438    ! The return value is of type LOGICAL
439    ! Standard: Fortran 95 and later.
440    integer :: I, POS
441end function
442
443complex function CABS(A)
444    ! It is specific name of ABS procedure.
445    ! Computes the absolute value of A.
446    ! Arguments:
447    ! A   -The type of the argument shall be an default COMPLEX.
448    complex :: A
449end function
450
451integer function CEILING(A [, KIND])
452    ! Returns the least integer greater than or equal to A
453    ! Arguments:
454    ! A  -The type shall be REAL.
455    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
456    ! Return value:
457    ! The return value is of type INTEGER(KIND) if KIND is present and a default-kind INTEGER otherwise.
458    ! Standard: Fortran 95 and later
459    real :: A
460    integer, optional :: KIND
461end function
462
463CHARACTER(1) function CHAR(I [, KIND])
464    ! Returns the character represented by the integer I
465    ! Arguments:
466    ! I     -The type shall be INTEGER.
467    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
468    ! Return value:
469    ! The return value is of type CHARACTER(1)
470    ! Standard: Fortran 77 and later
471    integer :: I
472    integer, optional :: KIND
473end function
474
475complex function CMPLX(X [, Y [, KIND]])
476    ! Returns a complex number where X is converted to the real component
477    ! If Y is present it is converted to the imaginary component. If Y is not present then the imaginary
478    ! component is set to 0.0. If X is complex then Y must not be present.
479	! Arguments:
480    ! X  -The type may be INTEGER, REAL, or COMPLEX.
481    ! Y  -(Optional; only allowed if X is not COMPLEX.) May be INTEGER or REAL.
482    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
483    ! Return value:
484    ! The return value is of COMPLEX type, with a kind equal to KIND if it is specified. If KIND is not specified,
485    ! the result is of the default COMPLEX kind, regardless of the kinds of X and Y.
486	! Standard: Fortran 77 and later
487    integer, real, complex :: X
488    integer, real :: Y
489    integer, optional :: KIND
490end function
491
492integer function COMMAND_ARGUMENT_COUNT()
493    ! Returns the number of arguments passed on the command line when the containing program was invoked
494    ! Return value:
495    ! The return value is an INTEGER of default kind.
496    ! Standard: Fortran 2003 and later
497end function
498
499function CONJG(Z)
500    ! Returns the conjugate of Z. If Z is (x, y) then the result is (x, -y)
501    ! Arguments:
502    ! Z -The type shall be COMPLEX.
503    ! Return value:
504    ! The return value is of type COMPLEX.
505    ! Standard: Fortran 77 and later
506    complex :: Z, CONJG
507end function
508
509function COS(X)
510    ! Computes the cosine of X.
511    ! Arguments:
512    ! X  -The type shall be REAL or COMPLEX.
513    ! Return value:
514    ! The return value is of the same type and kind as X. The real part of the result is in radians.
515    ! If X is of the type REAL, the return value lies in the range -1 <= cos(x) <= 1.
516    ! Standard: Fortran 77 and later
517    real, complex :: X, COS
518end function
519
520function CCOS(X)
521    ! This is specific name of COS function.
522    ! Computes the cosine of X.
523    ! Arguments:
524    ! X  -The type shall be COMPLEX.
525    ! Return value:
526    ! The return value is of the same type and kind as X. The real part of the result is in radians.
527    ! If X is of the type REAL, the return value lies in the range -1 <= cos(x) <= 1.
528    ! Standard: Fortran 77 and later
529    COMPLEX :: CCOS, X
530end function
531
532function DCOS(X)
533    ! This is specific name of COS function.
534    ! Computes the cosine of X.
535    ! Arguments:
536    ! X  -The type shall be Doubleprecision.
537    ! Return value:
538    ! The return value is of the same type and kind as X. The real part of the result is in radians.
539    ! If X is of the type REAL, the return value lies in the range -1 <= cos(x) <= 1.
540    ! Standard: Fortran 77 and later
541    doubleprecision :: DCOS, X
542end function
543
544function COSH(X)
545    ! Computes the hyperbolic cosine of X.
546    ! Arguments:
547    ! X  -The type shall be REAL or COMPLEX.
548    ! Return value:
549    ! The return value has same type and kind as X. If X is complex, the imaginary part of the result
550    ! is in radians. If X is REAL, the return value has a lower bound of one, cosh(x) >= 1.
551    ! Standard: Fortran 77 and later, for a complex argument Fortran 2008 or later
552    real, complex :: X, COSH
553end function
554
555function DCOSH(X)
556    ! This is specific name of COSH function.
557    ! Computes the hyperbolic cosine of X.
558    ! Arguments:
559    ! X  -The type shall be DOUBLE PRECISION.
560    ! Return value:
561    ! The return value has same type and kind as X. If X is complex, the imaginary part of the result
562    ! is in radians. If X is REAL, the return value has a lower bound of one, cosh(x) >= 1.
563    ! Standard: Fortran 77 and later.
564    doubleprecision :: DCOSH, X
565end function
566
567function COUNT(MASK [, DIM, KIND])
568    ! Counts the number of .TRUE. elements in a logical MASK, or, if the DIM argument is supplied,
569    ! counts the number of elements along each row of the array in the DIM direction. If the array
570    ! has zero size, or all of the elements of MASK are .FALSE., then the result is 0.
571    ! Arguments:
572    ! MASK  -The type shall be LOGICAL.
573    ! DIM   -(Optional) The type shall be INTEGER.
574    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
575    ! Return value:
576    ! The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is
577    ! of default integer kind. If DIM is present, the result is an array with a rank one less than
578    ! the rank of ARRAY, and a size corresponding to the shape of ARRAY with the DIM dimension removed.
579    ! Standard: Fortran 95 and later, with KIND argument Fortran 2003 and later
580    logical :: MASK(:[,...])
581    integer, optional :: DIM, KIND
582end function
583
584subroutine CPU_TIME(TIME)
585    ! Returns a REAL value representing the elapsed CPU time in seconds. This is useful for testing
586    ! segments of code to determine execution time.
587    ! If a time source is available, time will be reported with microsecond resolution. If no time
588    ! source is available, TIME is set to -1.0.
589    ! Note that TIME may contain a system dependent, arbitrary offset and may not start with 0.0.
590    ! For CPU_TIME, the absolute value is meaningless, only differences between subsequent calls
591    ! to this subroutine, as shown in the example below, should be used.
592    ! Arguments:
593    ! TIME  -The type shall be REAL with INTENT(OUT).
594    ! Standard: Fortran 95 and later
595    real, intent(out) :: TIME
596end subroutine
597
598function CSHIFT(ARRAY, SHIFT [, DIM])
599    ! Performs a circular shift on elements of ARRAY along the dimension of DIM. If DIM is omitted it is
600    ! taken to be 1. DIM is a scalar of type INTEGER in the range of 1 \leq DIM \leq n) where n is the
601    ! rank of ARRAY. If the rank of ARRAY is one, then all elements of ARRAY are shifted by SHIFT places.
602    ! If rank is greater than one, then all complete rank one sections of ARRAY along the given dimension
603    ! are shifted. Elements shifted out one end of each rank one section are shifted back in the other end.
604    ! Arguments:
605    ! ARRAY  -Shall be an array of any type.
606    ! SHIFT  -The type shall be INTEGER.
607    ! DIM    -The type shall be INTEGER.
608    ! Return value:
609    ! Returns an array of same type and rank as the ARRAY argument.
610    ! Standard: Fortran 95 and later
611    type(any_type) :: ARRAY(:[,...])
612    integer :: SHIFT
613    integer, optional :: DIM
614end function
615
616function DABS(A)
617    ! It is specific name of ABS procedure.
618    ! Computes the absolute value of A.
619    ! Arguments:
620    ! A   -The type of the argument shall be an default DOUBLEPRECISION.
621    double precision :: DABS, A
622end function
623
624subroutine DATE_AND_TIME([DATE, TIME, ZONE, VALUES])
625	! Gets the corresponding date and time information from the real-time system clock. DATE is INTENT(OUT)
626	! and has form ccyymmdd. TIME is INTENT(OUT) and has form hhmmss.sss. ZONE is INTENT(OUT) and has
627	! form (+-)hhmm, representing the difference with respect to Coordinated Universal Time (UTC).
628	! Unavailable time and date parameters return blanks.
629    ! VALUES is INTENT(OUT) and provides the following:
630    !   VALUE(1): 	The year
631    !   VALUE(2): 	The month
632    !   VALUE(3): 	The day of the month
633    !   VALUE(4): 	Time difference with UTC in minutes
634    !   VALUE(5): 	The hour of the day
635    !   VALUE(6): 	The minutes of the hour
636    !   VALUE(7): 	The seconds of the minute
637    !   VALUE(8): 	The milliseconds of the second
638    ! Arguments:
639    ! DATE  -(Optional) The type shall be CHARACTER(LEN=8) or larger, and of default kind.
640    ! TIME  -(Optional) The type shall be CHARACTER(LEN=10) or larger, and of default kind.
641    ! ZONE  -(Optional) The type shall be CHARACTER(LEN=5) or larger, and of default kind.
642    ! VALUES    -(Optional) The type shall be INTEGER(8).
643    ! Standard: Fortran 95 and later
644    character(len=8 or larger), optional :: DATE
645    character(len=10 or larger), optional :: TIME
646    character(len=5 or larger), optional :: ZONE
647    integer, dimension(8), optional :: VALUES
648end subroutine
649
650function DBLE(A)
651    ! Converts A to double precision real type.
652    ! Arguments:
653    ! A     -The type shall be INTEGER, REAL, or COMPLEX.
654    ! Return value:
655    ! The return value is of type double precision real.
656    ! Standard: Fortran 77 and later
657    integer, real, complex :: A
658    doubleprecision :: DBLE
659end function
660
661function DIGITS(X)
662    ! Returns the number of significant binary digits of the internal model representation of X.
663    ! For example, on a system using a 32-bit floating point representation, a default real number
664    ! would likely return 24.
665    ! Arguments:
666    ! X     -The type may be INTEGER or REAL.
667    ! Return value:
668    ! The return value is of type INTEGER.
669    ! Standard: Fortran 95 and later
670    integer :: DIGITS
671    integer, real :: X
672end function
673
674function DIM(X,Y)
675    ! Returns the difference X-Y if the result is positive; otherwise returns zero.
676    ! Arguments:
677    ! X     -The type shall be INTEGER or REAL
678    ! Y     -The type shall be the same type and kind as X.
679    ! Return value:
680    ! The return value is of type INTEGER or REAL.
681    ! Standard: Fortran 77 and later
682    integer, real :: X, Y, DIM
683end function
684
685function IDIM(X,Y)
686    ! This is specific name of DIM function.
687    ! Returns the difference X-Y if the result is positive; otherwise returns zero.
688    ! Arguments:
689    ! X     -The type shall be INTEGER.
690    ! Y     -The type shall be the same type and kind as X.
691    ! Return value:
692    ! The return value is of type INTEGER.
693    ! Standard: Fortran 77 and later
694    integer :: IDIM, X, Y
695end function
696
697function DDIM(X,Y)
698    ! This is specific name of DIM function.
699    ! Returns the difference X-Y if the result is positive; otherwise returns zero.
700    ! Arguments:
701    ! X     -The type shall be DOUBLE PRECISION.
702    ! Y     -The type shall be the same type and kind as X.
703    ! Return value:
704    ! The return value is of type DOUBLE PRECISION.
705    ! Standard: Fortran 77 and later
706    DOUBLE PRECISION :: DDIM, X, Y
707end function
708
709function DOT_PRODUCT(VECTOR_A, VECTOR_B)
710    ! Computes the dot product multiplication of two vectors VECTOR_A and VECTOR_B.
711    ! The two vectors may be either numeric or logical and must be arrays of rank one
712    ! and of equal size. If the vectors are INTEGER or REAL, the result is SUM(VECTOR_A*VECTOR_B).
713    ! If the vectors are COMPLEX, the result is SUM(CONJG(VECTOR_A)*VECTOR_B). If the vectors
714    ! are LOGICAL, the result is ANY(VECTOR_A .AND. VECTOR_B).
715    ! Arguments:
716    ! VECTOR_A  -The type shall be numeric or LOGICAL, rank 1.
717    ! VECTOR_B  -The type shall be numeric if VECTOR_A is of numeric type or LOGICAL if VECTOR_A
718    !            is of type LOGICAL. VECTOR_B shall be a rank-one array.
719    ! Return value:
720    ! If the arguments are numeric, the return value is a scalar of numeric type, INTEGER, REAL,
721    ! or COMPLEX. If the arguments are LOGICAL, the return value is .TRUE. or .FALSE..
722    ! Standard: Fortran 95 and later
723    type(any_numerical_or_logical) :: VECTOR_A(:), VECTOR_B(:)
724    type(same_as_argument) :: DOT_PRODUCT
725end function
726
727function DPROD(X,Y)
728    ! Returns the product X*Y.
729    ! Arguments:
730    ! X     -The type shall be REAL.
731    ! Y     -The type shall be REAL.
732    ! Return value:
733    ! The return value is of type REAL(8).
734    ! Standard: Fortran 77 and later
735    real(8) :: DPROD
736    real    :: X, Y
737end function
738
739function EOSHIFT(ARRAY, SHIFT [, BOUNDARY, DIM])
740    ! Performs an end-off shift on elements of ARRAY along the dimension of DIM. If DIM is omitted it is
741    ! taken to be 1. DIM is a scalar of type INTEGER in the range of 1 \leq DIM \leq n) where n is the
742    ! rank of ARRAY. If the rank of ARRAY is one, then all elements of ARRAY are shifted by SHIFT places.
743    ! If rank is greater than one, then all complete rank one sections of ARRAY along the given dimension
744    ! are shifted. Elements shifted out one end of each rank one section are dropped. If BOUNDARY is present
745    ! then the corresponding value of from BOUNDARY is copied back in the other end. If BOUNDARY is not
746    ! present then the following are copied in depending on the type of ARRAY.
747    ! "Array Type"  "Boundary Value"
748    !  Numeric       0 of the type and kind of ARRAY.
749    !  Logical       .FALSE..
750    !  Character(len) len blanks.
751    ! Arguments:
752    !   ARRAY     May be any type, not scalar.
753    !   SHIFT     The type shall be INTEGER.
754    !   BOUNDARY   Same type as ARRAY.
755    !   DIM       The type shall be INTEGER.
756    ! Return value:
757    ! Returns an array of same type and rank as the ARRAY argument.
758    ! Standard: Fortran 95 and later
759    type(any_type) :: ARRAY(:[,...])
760    integer :: SHIFT
761    type(same_as_ARRAY), optional :: BOUNDARY[(:[,...])]
762    type(same_as_ARRAY) :: EOSHIFT(:[,...])
763end function
764
765function EPSILON(X)
766	! Returns the smallest number E of the same kind as X such that 1 + E > 1.
767    ! Arguments:
768    ! X     -The type shall be REAL.
769    ! Return value:
770    ! The return value is of same type as the argument.
771    ! Standard: Fortran 95 and later
772    real :: X, EPSILON
773end function
774
775function ERF(X)
776    ! Computes the error function of X.
777    ! Arguments:
778    ! X     -The type shall be REAL.
779    ! Return value:
780    ! The return value is of type REAL, of the same kind as X and lies in the range -1 <= erf(x) <= 1 .
781    ! Standard: Fortran 2008 and later
782    real :: X, ERF
783end function
784
785function ERFC(X)
786	! Computes the complementary error function of X.
787    ! Arguments:
788    ! X     -The type shall be REAL.
789    ! Return value:
790    ! The return value is of type REAL and of the same kind as X. It lies in the range 0 <= erfc(x) <= 2 .
791    ! Standard: Fortran 2008 and later
792    real :: X, ERFC
793end function
794
795function ERFC_SCALED(X)
796    ! Computes the exponentially-scaled complementary error function of X.
797    ! Arguments:
798    ! X     -The type shall be REAL.
799    ! Return value:
800    ! The return value is of type REAL and of the same kind as X.
801    ! Standard: Fortran 2008 and later
802    real :: X, ERFC_SCALED
803end function
804
805function EXP(X)
806	! Computes the base e exponential of X.
807    ! Arguments:
808    ! X     -The type shall be REAL or COMPLEX.
809    ! Return value:
810    ! The return value has same type and kind as X.
811    ! Standard: Fortran 77 and later
812    real, complex :: X, EXP
813end function
814
815function CEXP(X)
816    ! This is specific name of EXP function.
817	! Computes the base e exponential of X.
818    ! Arguments:
819    ! X     -The type shall be COMPLEX.
820    ! Return value:
821    ! The return value has same type and kind as X.
822    ! Standard: Fortran 77 and later
823    COMPLEX :: CEXP, X
824end function
825
826function DEXP(X)
827    ! This is specific name of EXP function.
828	! Computes the base e exponential of X.
829    ! Arguments:
830    ! X     -The type shall be DOUBLE PRECISION.
831    ! Return value:
832    ! The return value has same type and kind as X.
833    ! Standard: Fortran 77 and later
834    DOUBLE PRECISION :: DEXP, X
835end function
836
837function EXPONENT(X)
838    ! Returns the value of the exponent part of X. If X is zero the value returned is zero.
839    ! Arguments:
840    ! X     -The type shall be REAL.
841    ! Return value:
842    ! The return value is of type default INTEGER.
843    ! Standard: Fortran 95 and later
844    real :: X
845    integer :: EXPONENT
846end function
847
848function FLOAT(A)
849	! Converts the integer A to a default real value.
850    ! Arguments:
851    ! A   -The type shall be INTEGER.
852    ! Return value:
853    ! The return value is of type default REAL.
854	! Standard: Fortran 77 and later
855    integer :: A
856    real :: FLOAT
857end function
858
859function FLOOR(A [, KIND])
860	! Returns the greatest integer less than or equal to X.
861    ! Arguments:
862    ! A      -The type shall be REAL.
863    ! KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
864    ! Return value:
865    ! The return value is of type INTEGER(KIND) if KIND is present and of default-kind INTEGER otherwise.
866    ! Standard: Fortran 95 and later
867    real :: A
868    integer, optional :: KIND
869    integer(KIND) :: FLOOR
870end function
871
872function FRACTION(X)
873    ! Returns the fractional part of the model representation of X.
874    ! Arguments:
875    ! X    -The type of the argument shall be a REAL.
876    ! Return value:
877    ! The return value is of the same type and kind as the argument. The fractional part of the model
878    ! representation of X is returned; it is X * RADIX(X)**(-EXPONENT(X)).
879    ! Standard: Fortran 95 and later
880    real :: X, FRACTION
881end function
882
883function GAMMA(X)
884	! Computes Gamma of X. For positive, integer values of X the Gamma function simplifies to the factorial
885	! function \Gamma(x)=(x-1)!.
886    ! Arguments:
887    ! X   -Shall be of type REAL and neither zero nor a negative integer.
888    ! Return value:
889    ! The return value is of type REAL of the same kind as X.
890    ! Standard: Fortran 2008 and later
891    real :: X, GAMMA
892end function
893
894subroutine GET_COMMAND([COMMAND, LENGTH, STATUS])
895    ! Retrieve the entire command line that was used to invoke the program.
896    ! Arguments:
897    ! COMMAND     -(Optional) shall be of type CHARACTER and of default kind.
898    ! LENGTH      -(Optional) Shall be of type INTEGER and of default kind.
899    ! STATUS      -(Optional) Shall be of type INTEGER and of default kind.
900    !
901    ! Return value:
902    ! If COMMAND is present, stores the entire command line that was used to invoke the program in COMMAND.
903    ! If LENGTH is present, it is assigned the length of the command line.
904    ! If STATUS is present, it is assigned 0 upon success of the command, -1 if COMMAND is too short
905    ! to store the command line, or a positive value in case of an error.
906    ! Standard: Fortran 2003 and later
907	character(len=*), optional :: COMMAND
908	integer, optional          :: LENGTH
909	integer, optional          :: STATUS
910end subroutine
911
912subroutine GET_COMMAND_ARGUMENT(NUMBER[, VALUE, LENGTH, STATUS])
913	! Retrieve the NUMBER-th argument that was passed on the command line when the containing program was invoked.
914    ! Arguments:
915    ! NUMBER 	Shall be a scalar of type INTEGER and of default kind, NUMBER >= 0
916    ! VALUE 	(Optional) Shall be a scalar of type CHARACTER and of default kind.
917    ! LENGTH 	(Optional) Shall be a scalar of type INTEGER and of default kind.
918    ! STATUS 	(Optional) Shall be a scalar of type INTEGER and of default kind.
919    !Return value:
920    ! After GET_COMMAND_ARGUMENT returns, the VALUE argument holds the NUMBER-th command line argument.
921    ! If VALUE can not hold the argument, it is truncated to fit the length of VALUE.
922    ! If there are less than NUMBER arguments specified at the command line, VALUE will be filled with blanks.
923    ! If NUMBER = 0, VALUE is set to the name of the program (on systems that support this feature).
924    ! The LENGTH argument contains the length of the NUMBER-th command line argument.
925    ! If the argument retrieval fails, STATUS is a positive number; if VALUE contains a truncated
926    ! command line argument, STATUS is -1; and otherwise the STATUS is zero.
927    ! Standard: Fortran 2003 and later
928    integer :: NUMBER
929    character(len=*), optional :: VALUE
930    integer, optional :: LENGTH
931    integer, optional :: STATUS
932end subroutine
933
934subroutine GET_ENVIRONMENT_VARIABLE(NAME[, VALUE, LENGTH, STATUS, TRIM_NAME])
935	! Get the VALUE of the environmental variable NAME.
936    ! Arguments:
937    ! NAME  -Shall be a scalar of type CHARACTER and of default kind.
938    ! VALUE -Shall be a scalar of type CHARACTER and of default kind.
939    ! LENGTH -Shall be a scalar of type INTEGER and of default kind.
940    ! STATUS -Shall be a scalar of type INTEGER and of default kind.
941    ! TRIM_NAME -Shall be a scalar of type LOGICAL and of default kind.
942    ! Return value:
943    ! Stores the value of NAME in VALUE. If VALUE is not large enough to hold the data, it is truncated.
944    ! If NAME is not set, VALUE will be filled with blanks. Argument LENGTH contains the length needed
945    ! for storing the environment variable NAME or zero if it is not present. STATUS is -1 if VALUE is
946    ! present but too short for the environment variable; it is 1 if the environment variable does not exist
947    ! and 2 if the processor does not support environment variables; in all other cases STATUS is zero.
948    ! If TRIM_NAME is present with the value .FALSE., the trailing blanks in NAME are significant; otherwise
949    ! they are not part of the environment variable name.
950    ! Standard: Fortran 2003 and later
951    character(len=*) :: NAME
952    character(len=*), optional :: VALUE
953    integer, optional :: LENGTH
954    integer, optional :: STATUS
955    logical, optional :: TRIM_NAME
956end subroutine
957
958function HUGE(X)
959    ! Returns the largest number that is not an infinity in the model of the type of X.
960    ! Arguments:
961    ! X   -Shall be of type REAL or INTEGER.
962    ! Return value:
963    ! The return value is of the same type and kind as X
964    ! Standard: Fortran 95 and later
965    real, integer :: X, HUGE
966end function
967
968function HYPOT(X, Y)
969    ! HYPOT(X,Y) is the Euclidean distance function. It is equal to sqrt(X^2 + Y^2), without undue underflow or overflow.
970    ! Arguments:
971    ! X   -The type shall be REAL.
972    ! Y   -The type and kind type parameter shall be the same as X.
973    ! Return value:
974    ! The return value has the same type and kind type parameter as X.
975	! Standard: Fortran 2008 and later
976    real :: X, Y, HYPOT
977end function
978
979function IABS(A)
980    ! It is specific name of ABS procedure.
981    ! Computes the absolute value of A.
982    ! Arguments:
983    ! A   -The type of the argument shall be an default INTEGER.
984    integer :: IABS, A
985end function
986
987function IACHAR(C [, KIND])
988	! Returns the code for the ASCII character in the first character position of C.
989    ! Arguments:
990    ! C    -Shall be a scalar CHARACTER, with INTENT(IN)
991    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
992    ! Return value:
993    ! The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of default integer kind.
994    ! Standard: Fortran 95 and later, with KIND argument Fortran 2003 and later
995    character, intent(in) :: C
996    integer, optional :: KIND
997    integer(KIND) :: IACHAR
998end function
999
1000function IAND(I, J)
1001	! Bitwise logical AND.
1002    ! Arguments:
1003    ! I    -The type shall be INTEGER.
1004    ! J    -The type shall be INTEGER, of the same kind as I.
1005    ! Return value:
1006    ! The return type is INTEGER, of the same kind as the arguments.
1007    ! Standard: Fortran 95 and later
1008    integer :: I, J, IAND
1009end function
1010
1011function IBCLR(I, POS)
1012    !returns the value of I with the bit at position POS set to zero.
1013    ! Arguments:
1014    ! I     -The type shall be INTEGER.
1015    ! POS   -The type shall be INTEGER.
1016    ! Return value:
1017    ! The return value is of type INTEGER and of the same kind as I.
1018    ! Standard: Fortran 95 and later
1019    integer :: IBCLR, I, POS
1020end function
1021
1022function IBITS(I, POS, LEN)
1023	! IBITS extracts a field of length LEN from I, starting from bit position POS and extending left for LEN bits.
1024	! The result is right-justified and the remaining bits are zeroed. The value of POS+LEN must be less
1025	! than or equal to the value BIT_SIZE(I).
1026    ! Arguments:
1027    ! I     -The type shall be INTEGER.
1028    ! POS   -The type shall be INTEGER.
1029    ! LEN   -The type shall be INTEGER.
1030    ! Return value:
1031    ! The return value is of type INTEGER and of the same kind as I.
1032    ! Standard: Fortran 95 and later
1033    integer :: IBITS, I, POS, LEN
1034end function
1035
1036function IBSET(I, POS)
1037	! IBSET returns the value of I with the bit at position POS set to one.
1038    ! Arguments:
1039    ! I     -The type shall be INTEGER.
1040    ! POS   -The type shall be INTEGER.
1041    ! Return value:
1042    ! The return value is of type INTEGER and of the same kind as I.
1043    ! Standard: Fortran 95 and later
1044    integer :: IBSET, I, POS
1045end function
1046
1047function ICHAR(C [, KIND])
1048	! Returns the code for the character in the first character position of C in the system's
1049	! native character set.
1050    ! Arguments:
1051    ! C     -Shall be a scalar CHARACTER, with INTENT(IN)
1052    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1053    ! Return value:
1054    ! The return value is of type INTEGER and of kind KIND. If KIND is absent,
1055    ! the return value is of default integer kind.
1056    ! Standard: Fortan 95 and later, with KIND argument Fortran 2003 and later
1057    character, intent(in) :: C
1058    integer, optional :: KIND
1059    integer(KIND) :: ICHAR
1060end function
1061
1062function IEOR(I, J)
1063	! Returns the bitwise boolean exclusive-OR of I and J.
1064    ! Arguments:
1065    ! I     -The type shall be INTEGER.
1066    ! J     -The type shall be INTEGER, of the same kind as I.
1067    ! Return value:
1068    ! The return type is INTEGER, of the same kind as the arguments.
1069    ! Standard: Fortran 95 and later
1070    integer :: IEOR, I, J
1071end function
1072
1073function INDEX(STRING, SUBSTRING [, BACK [, KIND]])
1074    ! Returns the position of the start of the first occurrence of string SUBSTRING as a substring in STRING,
1075    ! counting from one. If SUBSTRING is not present in STRING, zero is returned. If the BACK argument is
1076    ! present and true, the return value is the start of the last occurrence rather than the first.
1077    ! Standard: Fortran 77 and later, with KIND argument Fortran 2003 and later
1078    ! Arguments:
1079    ! STRING        -Shall be a scalar CHARACTER, with INTENT(IN)
1080    ! SUBSTRING     -Shall be a scalar CHARACTER, with INTENT(IN)
1081    ! BACK          -(Optional) Shall be a scalar LOGICAL, with INTENT(IN)
1082    ! KIND          -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1083    ! Return value:
1084    ! The return value is of type INTEGER and of kind KIND. If KIND is absent,
1085    ! the return value is of default integer kind.
1086    integer :: INDEX
1087	character(len=*) :: STRING, SUBSTRING
1088	logical, optional :: BACK
1089	integer, optional :: KIND
1090end function
1091
1092function INT(A [, KIND))
1093	! Convert to integer type
1094    ! Arguments:
1095    ! A     -Shall be of type INTEGER, REAL, or COMPLEX.
1096    ! KIND  -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1097    ! Return value:
1098    ! These functions return a INTEGER variable or array under the following rules:
1099    ! (A)
1100    !    If A is of type INTEGER, INT(A) = A
1101    !(B)
1102    !    If A is of type REAL and |A| < 1, INT(A) equals 0. If |A| >= 1, then INT(A) equals the largest
1103    !    integer that does not exceed the range of A and whose sign is the same as the sign of A.
1104    ! (C)
1105    !    If A is of type COMPLEX, rule B is applied to the real part of A.
1106    ! Standard: Fortran 77 and later
1107    integer, real, complex :: A
1108    integer, optional :: KIND
1109    integer(KIND) :: INT
1110end function
1111
1112function IFIX(A)
1113    ! This is specific name of INT function.
1114	! Convert to integer type
1115    ! Standard: Fortran 77 and later
1116    real :: A
1117    integer :: IFIX
1118end function
1119
1120function IDINT(A)
1121    ! This is specific name of INT function.
1122	! Convert to integer type
1123    ! Standard: Fortran 77 and later
1124    double precision :: A
1125    integer :: IDINT
1126end function
1127
1128function IOR(I, J)
1129	! IOR returns the bitwise boolean inclusive-OR of I and J.
1130    ! Arguments:
1131    ! I     -The type shall be INTEGER.
1132    ! J 	-The type shall be INTEGER, of the same kind as I.
1133    ! Return value:
1134    ! The return type is INTEGER, of the same kind as the arguments.
1135    ! Standard: Fortran 95 and later
1136    integer :: IOR, I, J
1137end function
1138
1139function IS_IOSTAT_END(I)
1140	! Tests whether an variable has the value of the I/O status 'end of file'. The function is
1141	! equivalent to comparing the variable with the IOSTAT_END parameter of the intrinsic module ISO_FORTRAN_ENV.
1142    ! Arguments:
1143    ! I   -Shall be of the type INTEGER.
1144    ! Return value:
1145    ! Returns a LOGICAL of the default kind, which .TRUE. if I has the value which indicates an end of file
1146    ! condition for IOSTAT= specifiers, and is .FALSE. otherwise.
1147    ! Standard: Fortran 2003 and later
1148    integer :: I
1149    logical :: IS_IOSTAT_END
1150end function
1151
1152function IS_IOSTAT_EOR(I)
1153	! Tests whether an variable has the value of the I/O status 'end of record'. The function is equivalent
1154	! to comparing the variable with the IOSTAT_EOR parameter of the intrinsic module ISO_FORTRAN_ENV.
1155    ! Arguments:
1156    ! I     -Shall be of the type INTEGER.
1157    ! Return value:
1158    ! Returns a LOGICAL of the default kind, which .TRUE. if I has the value which indicates an end of file
1159    ! condition for IOSTAT= specifiers, and is .FALSE. otherwise.
1160    ! Standard: Fortran 2003 and later
1161    logical :: IS_IOSTAT_EOR
1162    integer :: I
1163end function
1164
1165function ISHFT(I, SHIFT)
1166	! Returns a value corresponding to I with all of the bits shifted SHIFT places. A value of SHIFT
1167	! greater than zero corresponds to a left shift, a value of zero corresponds to no shift, and a value
1168	! less than zero corresponds to a right shift. If the absolute value of SHIFT is greater than BIT_SIZE(I),
1169	! the value is undefined. Bits shifted out from the left end or right end are lost; zeros are shifted
1170	! in from the opposite end.
1171    ! Arguments:
1172    ! I         -The type shall be INTEGER.
1173    ! SHIFT     -The type shall be INTEGER.
1174    ! Return value:
1175    ! The return value is of type INTEGER and of the same kind as I.
1176    ! Standard: Fortran 95 and later
1177    integer :: I, SHIFT, ISHFT
1178end function
1179
1180function ISHFTC(I, SHIFT [, SIZE])
1181	! Returns a value corresponding to I with the rightmost SIZE bits shifted circularly SHIFT places;
1182	! that is, bits shifted out one end are shifted into the opposite end. A value of SHIFT greater than
1183	! zero corresponds to a left shift, a value of zero corresponds to no shift, and a value less than
1184	! zero corresponds to a right shift. The absolute value of SHIFT must be less than SIZE. If the SIZE
1185	! argument is omitted, it is taken to be equivalent to BIT_SIZE(I).
1186    ! Arguments:
1187    !   I    -The type shall be INTEGER.
1188    ! SHIFT  -The type shall be INTEGER.
1189    ! SIZE   -(Optional) The type shall be INTEGER; the value must be greater than zero and less than or equal to BIT_SIZE(I).
1190    ! Return value:
1191    ! The return value is of type INTEGER and of the same kind as I.
1192    ! Standard: Fortran 95 and later
1193    integer :: I, SHIFT, ISHFTC
1194    integer, optional :: SIZE
1195end function
1196
1197function KIND(X)
1198    ! Returns the kind value of the entity X.
1199    ! Arguments:
1200    ! X     -Shall be of type LOGICAL, INTEGER, REAL, COMPLEX or CHARACTER.
1201    ! Return value:
1202    ! The return value is a scalar of type INTEGER and of the default integer kind.
1203    ! Standard: Fortran 95 and later
1204    LOGICAL, INTEGER, REAL, COMPLEX, CHARACTER :: X
1205    INTEGER :: KIND
1206end function
1207
1208function LBOUND(ARRAY [, DIM [, KIND]])
1209    ! Returns the lower bounds of an array, or a single lower bound along the DIM dimension.
1210    ! Arguments:
1211    ! ARRAY     -Shall be an array, of any type.
1212    ! DIM       -(Optional) Shall be a scalar INTEGER.
1213    ! KIND      -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1214    ! Return value:
1215    ! The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of default
1216    ! integer kind. If DIM is absent, the result is an array of the lower bounds of ARRAY. If DIM is present,
1217    ! the result is a scalar corresponding to the lower bound of the array along that dimension. If ARRAY is
1218    ! an expression rather than a whole array or array structure component, or if it has a zero extent along
1219    ! the relevant dimension, the lower bound is taken to be 1.
1220    ! Standard: Fortran 95 and later, with KIND argument Fortran 2003 and later
1221    type(any_type) :: ARRAY(:[,...])
1222    integer, optional :: DIM, KIND
1223    integer(KIND) :: LBOUND
1224end function
1225
1226function LEADZ(I)
1227    ! Returns the number of leading zero bits of an integer.
1228    ! Arguments:
1229    ! I     -Shall be of type INTEGER.
1230    ! Return value:
1231    ! The type of the return value is the default INTEGER. If all the bits of I are zero, the result value is BIT_SIZE(I).
1232    ! Standard: Fortran 2008 and later
1233    integer :: I, LEADZ
1234end function
1235
1236function LEN(STRING [, KIND])
1237    ! Returns the length of a character string. If STRING is an array, the length of an element of STRING
1238    ! is returned. Note that STRING need not be defined when this intrinsic is invoked, since only the length,
1239    ! not the content, of STRING is needed.
1240    ! Arguments:
1241    ! STRING    -Shall be a scalar or array of type CHARACTER, with INTENT(IN)
1242    ! KIND      -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1243    ! Return value:
1244    ! The return value is of type INTEGER and of kind KIND. If KIND is absent,
1245    ! the return value is of default integer kind.
1246    ! Standard: Fortran 77 and later, with KIND argument Fortran 2003 and later
1247    character(len=*), intent(in) :: STRING
1248    integer, optional :: KIND
1249    integer(KIND) :: LEN
1250end function
1251
1252function LEN_TRIM(STRING [, KIND])
1253	! Returns the length of a character string, ignoring any trailing blanks.
1254    ! Arguments:
1255    ! STRING    -Shall be a scalar of type CHARACTER, with INTENT(IN)
1256    ! KIND      -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1257    ! Return value:
1258    ! The return value is of type INTEGER and of kind KIND. If KIND is absent,
1259    ! the return value is of default integer kind.
1260    ! Standard: Fortran 95 and later, with KIND argument Fortran 2003 and later
1261    character(len=*), intent(in) :: STRING
1262    integer, optional :: KIND
1263    integer(KIND) :: LEN_TRIM
1264end function
1265
1266function LGE(STRING_A, STRING_B)
1267	! Determines whether one string is lexically greater than or equal to another string,
1268	! where the two strings are interpreted as containing ASCII character codes.
1269	! If the String A and String B are not the same length, the shorter is compared as if spaces
1270	! were appended to it to form a value that has the same length as the longer.
1271    !
1272    ! In general, the lexical comparison intrinsics LGE, LGT, LLE, and LLT differ from
1273    ! the corresponding intrinsic operators .GE., .GT., .LE., and .LT., in that the latter use the
1274    ! processor's character ordering (which is not ASCII on some targets), whereas the former
1275    ! always use the ASCII ordering.
1276    ! Arguments:
1277    ! STRING_A      -Shall be of default CHARACTER type.
1278    ! STRING_B      -Shall be of default CHARACTER type.
1279    ! Return value:
1280    ! Returns .TRUE. if STRING_A >= STRING_B, and .FALSE. otherwise, based on the ASCII ordering.
1281    ! Standard: Fortran 77 and later
1282    character(len=*) :: STRING_A, STRING_B
1283    logical :: LGE
1284end function
1285
1286function LGT(STRING_A, STRING_B)
1287	! Determines whether one string is lexically greater than another string, where the two strings
1288	! are interpreted as containing ASCII character codes. If the String A and String B are not the
1289	! same length, the shorter is compared as if spaces were appended to it to form a value that has
1290	! the same length as the longer.
1291    ! In general, the lexical comparison intrinsics LGE, LGT, LLE, and LLT differ from the corresponding
1292    ! intrinsic operators .GE., .GT., .LE., and .LT., in that the latter use the processor's character
1293    ! ordering (which is not ASCII on some targets), whereas the former always use the ASCII ordering.
1294    ! Arguments:
1295    ! STRING_A  -Shall be of default CHARACTER type.
1296    ! STRING_B  -Shall be of default CHARACTER type.
1297    ! Return value:
1298    ! Returns .TRUE. if STRING_A > STRING_B, and .FALSE. otherwise, based on the ASCII ordering.
1299    ! Standard: Fortran 77 and later
1300    character(len=*) :: STRING_A, STRING_B
1301    logical :: LGT
1302end function
1303
1304function LLE(STRING_A, STRING_B)
1305	! Determines whether one string is lexically less than or equal to another string, where the
1306	! two strings are interpreted as containing ASCII character codes. If the String A and String B
1307	! are not the same length, the shorter is compared as if spaces were appended to it to form
1308	! a value that has the same length as the longer.
1309    ! In general, the lexical comparison intrinsics LGE, LGT, LLE, and LLT differ from the
1310    ! corresponding intrinsic operators .GE., .GT., .LE., and .LT., in that the latter use the
1311    ! processor's character ordering (which is not ASCII on some targets), whereas the former
1312    ! always use the ASCII ordering.
1313    ! Arguments:
1314    !    STRING_A 	-Shall be of default CHARACTER type.
1315    !    STRING_B 	-Shall be of default CHARACTER type.
1316    ! Return value:
1317    !    Returns .TRUE. if STRING_A <= STRING_B, and .FALSE. otherwise, based on the ASCII ordering.
1318    ! Standard: Fortran 77 and later
1319    character(len=*) :: STRING_A, STRING_B
1320    logical :: LLE
1321end function
1322
1323function LLT(STRING_A, STRING_B)
1324	! Determines whether one string is lexically less than another string, where the two strings
1325	! are interpreted as containing ASCII character codes. If the String A and String B are not
1326	! the same length, the shorter is compared as if spaces were appended to it to form a value
1327	! that has the same length as the longer.
1328    ! In general, the lexical comparison intrinsics LGE, LGT, LLE, and LLT differ from the
1329    ! corresponding intrinsic operators .GE., .GT., .LE., and .LT., in that the latter use
1330    ! the processor's character ordering (which is not ASCII on some targets), whereas the
1331    ! former always use the ASCII ordering.
1332    ! Arguments:
1333    !    STRING_A 	Shall be of default CHARACTER type.
1334    !    STRING_B 	Shall be of default CHARACTER type.
1335    ! Return value:
1336    !    Returns .TRUE. if STRING_A < STRING_B, and .FALSE. otherwise, based on the ASCII ordering.
1337    ! Standard: Fortran 77 and later
1338    character(len=*) :: STRING_A, STRING_B
1339    logical :: LLT
1340end function
1341
1342function LOG(X)
1343	! Computes the natural logarithm of X.
1344    ! Arguments:
1345    !    X  -The type shall be REAL or COMPLEX.
1346    ! Return value:
1347    !    The return value is of type REAL or COMPLEX. The kind type parameter is the same as X.
1348    !    If X is COMPLEX, the imaginary part \omega is in the range -pi <= \omega <= pi.
1349    ! Standard:  Fortran 77 and later
1350    real, complex :: X, LOG
1351end function
1352
1353function ALOG(X)
1354    ! This is specific name of LOG function.
1355	! Computes the logarithm of X.
1356    ! Arguments:
1357    !    X  -The type shall be REAL.
1358    ! Standard: Fortran 77 and later
1359    real :: ALOG, X
1360end function
1361
1362function CLOG(X)
1363    ! This is specific name of LOG function.
1364	! Computes the logarithm of X.
1365    ! Arguments:
1366    !    X  -The type shall be COMLEX.
1367    ! Standard:
1368    !    Fortran 77 and later
1369    complex :: CLOG, X
1370end function
1371
1372function DLOG(X)
1373    ! This is specific name of LOG function.
1374	! Computes the logarithm of X.
1375    ! Arguments:
1376    !    X  -The type shall be DOUBLE PRECISION.
1377    ! Standard:
1378    !    Fortran 77 and later
1379    real :: DLOG, X
1380end function
1381
1382function LOG10(X)
1383	! Computes the base 10 logarithm of X.
1384    ! Arguments:
1385    !    X    -The type shall be REAL.
1386    ! Return value:
1387    !    The return value is of type REAL or COMPLEX. The kind type parameter is the same as X.
1388    ! Standard:
1389    !    Fortran 77 and later
1390    real :: X, LOG10
1391end function
1392
1393function ALOG10(X)
1394    ! This is specific name of LOG10 function.
1395	! Computes the base 10 logarithm of X.
1396    ! Arguments:
1397    !    X    -The type shall be REAL.
1398    ! Return value:
1399    !    The return value is of type REAL.
1400    ! Standard:
1401    !    Fortran 77 and later
1402    real :: ALOG10, X
1403end function
1404
1405function DLOG10(X)
1406    ! This is specific name of LOG10 function.
1407	! Computes the base 10 logarithm of X.
1408    ! Arguments:
1409    !    X    -The type shall be DOUBLE PRECISION.
1410    ! Return value:
1411    !    The return value is of type DOUBLE PRECISION.
1412    ! Standard:
1413    !    Fortran 77 and later
1414    double precision :: DLOG10, X
1415end function
1416
1417function LOG_GAMMA(X)
1418	! Computes the natural logarithm of the absolute value of the Gamma function.
1419    ! Arguments:
1420    !    X  -Shall be of type REAL and neither zero nor a negative integer.
1421    ! Return value:
1422    !    The return value is of type REAL of the same kind as X.
1423    ! Standard:
1424    !    Fortran 2008 and later
1425    real :: X, LOG_GAMMA
1426end function
1427
1428function LOGICAL(L [, KIND])
1429	! Converts one kind of LOGICAL variable to another.
1430    ! Arguments:
1431    !    L      -The type shall be LOGICAL.
1432    !    KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1433    ! Return value:
1434    !    The return value is a LOGICAL value equal to L, with a kind corresponding to KIND, or of the
1435    !    default logical kind if KIND is not given.
1436    ! Standard:
1437    !    Fortran 95 and later
1438    logical :: L
1439    integer, optional :: KIND
1440    logical(KIND) :: LOGICAL
1441end function
1442
1443function MATMUL(MATRIX_A, MATRIX_B)
1444	! Performs a matrix multiplication on numeric or logical arguments.
1445    ! Arguments:
1446    !    MATRIX_A   -An array of INTEGER, REAL, COMPLEX, or LOGICAL type, with a rank of one or two.
1447    !    MATRIX_B   -An array of INTEGER, REAL, or COMPLEX type if MATRIX_A is of a numeric type; otherwise,
1448    !                an array of LOGICAL type. The rank shall be one or two, and the first (or only) dimension
1449    !                of MATRIX_B shall be equal to the last (or only) dimension of MATRIX_A.
1450    ! Return value:
1451    !    The matrix product of MATRIX_A and MATRIX_B. The type and kind of the result follow the usual type
1452    !    and kind promotion rules, as for the * or .AND. operators.
1453    !    The rank and shape of the result depends on the rank and shapes of the arguments, as follows:
1454    !    If MATRIX_A has shape (n, m) and MATRIX_B has shape (m, k), the result is a rank-two array with shape (n, k).
1455    !    If MATRIX_A has shape (m) and MATRIX_B has shape (m, k), the result is a rank-one array with shape (k).
1456    !    If MATRIX_A has shape (n, m) and MATRIX_B has shape (m), the result is a rank-one array with shape (n).
1457    !
1458    !    If the arguments are of numeric type, element (i, j) of the result has the value
1459    !    SUM ((row i of MATRIX_A) * (column j of MATRIX_B)). If the arguments are of logical type, element (i, j)
1460    !    of the result has the value ANY ((row i of MATRIX_A) .AND. (column j of MATRIX_B)).
1461    !
1462    ! Standard:
1463    !    Fortran 95 and later
1464    integer, real, complex or logical :: MATRIX_A(:[,:]), MATRIX_B(:[,:])
1465end function
1466
1467function MAX(A1, A2[, A3, A4, A5, ...])
1468    ! Returns the argument with the largest (most positive) value.
1469    ! Syntax:
1470    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1471    ! Arguments:
1472    !    A1     -The type shall be INTEGER or REAL.
1473    !    A2, A3, ...    -An expression of the same type and kind as A1.
1474    ! Return value:
1475    !    The return value corresponds to the maximum value among the arguments, and has the same
1476    !    type and kind as the argument.
1477    ! Standard:
1478    !    Fortran 77 and later
1479    integer or real :: A1, A2, A3, A4, A5, MAX
1480end function
1481
1482function MAX0(A1, A2)
1483    ! This is specific name of MAX function.
1484    ! Returns the argument with the largest (most positive) value.
1485    ! Syntax:
1486    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1487    ! Arguments:
1488    !    A1     -The type shall be INTEGER.
1489    !    A2, A3, ...    -An expression of the same type and kind as A1.
1490    ! Return value:
1491    !    The return value corresponds to the maximum value among the arguments, and has the same
1492    !    type and kind as the argument.
1493    ! Standard:
1494    !    Fortran 77 and later
1495    integer :: MAX0, A1, A2
1496end function
1497
1498function AMAX1(A1, A2)
1499    ! This is specific name of MAX function.
1500    ! Returns the argument with the largest (most positive) value.
1501    ! Syntax:
1502    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1503    ! Arguments:
1504    !    A1     -The type shall be REAL.
1505    !    A2, A3, ...    -An expression of the same type and kind as A1.
1506    ! Return value:
1507    !    The return value corresponds to the maximum value among the arguments, and has the same
1508    !    type and kind as the argument.
1509    ! Standard:
1510    !    Fortran 77 and later
1511    real :: AMAX1, A1, A2
1512end function
1513
1514function DMAX1(A1, A2)
1515    ! This is specific name of MAX function.
1516    ! Returns the argument with the largest (most positive) value.
1517    ! Syntax:
1518    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1519    ! Arguments:
1520    !    A1     -The type shall be DOUBLE PRECISION.
1521    !    A2, A3, ...    -An expression of the same type and kind as A1.
1522    ! Return value:
1523    !    The return value corresponds to the maximum value among the arguments, and has the same
1524    !    type and kind as the argument.
1525    ! Standard:
1526    !    Fortran 77 and later
1527    double precision :: DMAX1, A1, A2
1528end function
1529
1530function MAX1(A1, A2)
1531    ! This is specific name of MAX function.
1532    ! MAX1 is equivalent to INT ( MAX ( . . .) )
1533    ! Returns the argument with the largest (most positive) value.
1534    ! Syntax:
1535    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1536    ! Arguments:
1537    !    A1     -The type shall be REAL.
1538    !    A2, A3, ...    -An expression of the same type and kind as A1.
1539    ! Return value:
1540    !    The return value corresponds to the maximum value among the arguments, and has the same
1541    !    type and kind as the argument.
1542    ! Standard:
1543    !    Fortran 77 and later
1544    integer :: MAX1
1545    real :: A1, A2
1546end function
1547
1548function AMAX0(A1, A2)
1549    ! This is specific name of MAX function.
1550    ! AMAX0 is equivalent to REAL ( MAX ( . . . ) )
1551    ! Returns the argument with the largest (most positive) value.
1552    ! Syntax:
1553    !    RESULT = MAX(A1, A2 [, A3 [, ...]])
1554    ! Arguments:
1555    !    A1     -The type shall be INTEGER.
1556    !    A2, A3, ...    -An expression of the same type and kind as A1.
1557    ! Return value:
1558    !    The return value corresponds to the maximum value among the arguments, and has the same
1559    !    type and kind as the argument.
1560    ! Standard:
1561    !    Fortran 77 and later
1562    real :: AMAX0
1563    integer :: A1, A2
1564end function
1565
1566function MAXEXPONENT(X)
1567    ! Returns the maximum exponent in the model of the type of X.
1568    ! Arguments:
1569    !    X  -Shall be of type REAL.
1570    ! Return value:
1571    !    The return value is of type INTEGER and of the default integer kind.
1572    ! Standard:
1573    !    Fortran 95 and later
1574    real :: X
1575    integer :: MAXEXPONENT
1576end function
1577
1578function MAXLOC(ARRAY [, DIM] [, MASK] [, KIND] [, BACK])
1579	! Determines the location of the element in the array with the maximum value, or, if the DIM
1580	! argument is supplied, determines the locations of the maximum element along each row of the
1581	! array in the DIM direction. If MASK is present, only the elements for which MASK is .TRUE.
1582	! are considered. If more than one element in the array has the maximum value, the location
1583	! returned is that of the first such element in array element order. If the array has zero size,
1584	! or all of the elements of MASK are .FALSE., then the result is an array of zeroes. Similarly,
1585	! if DIM is supplied and all of the elements of MASK along a given row are zero, the result value
1586	! for that row is zero.
1587    ! Syntax:
1588    !    RESULT = MAXLOC(ARRAY, DIM [, MASK])
1589    !    RESULT = MAXLOC(ARRAY [, MASK])
1590    ! Arguments:
1591    !    ARRAY  -Shall be an array of type INTEGER or REAL.
1592    !    DIM    -(Optional) Shall be a scalar of type INTEGER, with a value between one and the rank
1593    !             of ARRAY, inclusive. It may not be an optional dummy argument.
1594    !    MASK   -Shall be an array of type LOGICAL, and conformable with ARRAY.
1595    !    BACK   -LOGICAL
1596    ! Return value:
1597    !    If DIM is absent, the result is a rank-one array with a length equal to the rank of ARRAY.
1598    !    If DIM is present, the result is an array with a rank one less than the rank of ARRAY, and
1599    !    a size corresponding to the size of ARRAY with the DIM dimension removed. If DIM is present
1600    !    and ARRAY has a rank of one, the result is a scalar. In all cases, the result is of default INTEGER type.
1601    ! Standard:
1602    !    Fortran 95 and later
1603    integer or real :: ARRAY(:[,:,...])
1604    integer, optional :: DIM
1605    logical, optional :: MASK(:[,:,...])
1606    integer, optional :: KIND
1607    logical, optional :: BACK
1608    integer :: MAXLOC(:[,:,...])
1609end function
1610
1611function MAXVAL(ARRAY [, DIM] [, MASK])
1612	! Determines the maximum value of the elements in an array value, or, if the DIM argument is supplied,
1613	! determines the maximum value along each row of the array in the DIM direction. If MASK is present,
1614	! only the elements for which MASK is .TRUE. are considered. If the array has zero size, or all of the
1615	! elements of MASK are .FALSE., then the result is -HUGE(ARRAY) if ARRAY is numeric, or a string of nulls
1616	! if ARRAY is of character type.
1617    ! Syntax:
1618    !    RESULT = MAXVAL(ARRAY, DIM [, MASK])
1619    !    RESULT = MAXVAL(ARRAY [, MASK])
1620    ! Arguments:
1621    !    ARRAY  -Shall be an array of type INTEGER or REAL.
1622    !    DIM    -(Optional) Shall be a scalar of type INTEGER, with a value between one and the rank of
1623    !             ARRAY, inclusive. It may not be an optional dummy argument.
1624    !    MASK   -Shall be an array of type LOGICAL, and conformable with ARRAY.
1625    ! Return value:
1626    !    If DIM is absent, or if ARRAY has a rank of one, the result is a scalar. If DIM is present,
1627    !    the result is an array with a rank one less than the rank of ARRAY, and a size corresponding
1628    !    to the size of ARRAY with the DIM dimension removed. In all cases, the result is of the same
1629    !    type and kind as ARRAY.
1630    ! Standard: Fortran 95 and later
1631    integer or real :: ARRAY(:[,:,...])
1632    integer, optional :: DIM
1633    logical, optional :: MASK(:[,:,...])
1634    integer :: MAXVAL[(:,...)]
1635end function
1636
1637function MERGE(TSOURCE, FSOURCE, MASK)
1638	! Select values from two arrays according to a logical mask. The result is equal to TSOURCE if MASK
1639	! is .TRUE., or equal to FSOURCE if it is .FALSE..
1640    ! Arguments:
1641    !    TSOURCE    -May be of any type.
1642    !    FSOURCE    -Shall be of the same type and type parameters as TSOURCE.
1643    !    MASK       -Shall be of type LOGICAL.
1644    ! Return value:
1645    !    The result is of the same type and type parameters as TSOURCE.
1646    ! Standard:
1647    !    Fortran 95 and later
1648    type(any_type) :: TSOURCE(:[,:,...]), FSOURCE(:[,:,...])
1649    logical :: MASK(:[,:,...])
1650end function
1651
1652function MIN(A1, A2[, A3, A4, A5, ...])
1653	! Returns the argument with the smallest (most negative) value.
1654    ! Syntax:
1655    !    RESULT = MIN(A1, A2 [, A3, ...])
1656    ! Arguments:
1657    !    A1         -The type shall be INTEGER or REAL.
1658    !    A2, A3, ...    -An expression of the same type and kind as A1.
1659    ! Return value:
1660    !    The return value corresponds to the maximum value among the arguments, and has the same type
1661    !    and kind as the first argument.
1662    ! Standard:
1663    !    Fortran 77 and later
1664    integer or real :: A1, A2, A3, A4, A5, MIN
1665end function
1666
1667function MIN0(A1, A2)
1668    ! This is specific name of MIN function.
1669	! Returns the argument with the smallest (most negative) value.
1670    ! Syntax:
1671    !    RESULT = MIN(A1, A2 [, A3, ...])
1672    ! Arguments:
1673    !    A1         -The type shall be INTEGER.
1674    !    A2, A3, ...    -An expression of the same type and kind as A1.
1675    ! Return value:
1676    !    The return value corresponds to the maximum value among the arguments, and has the same type
1677    !    and kind as the first argument.
1678    ! Standard:
1679    !    Fortran 77 and later
1680    integer :: MIN0, A1, A2
1681end function
1682
1683function AMIN0(A1, A2)
1684    ! This is specific name of MIN function.
1685    ! AMIN0 is equivalent to REAL ( MIN ( . . . ) )
1686	! Returns the argument with the smallest (most negative) value.
1687    ! Syntax:
1688    !    RESULT = MIN(A1, A2 [, A3, ...])
1689    ! Arguments:
1690    !    A1         -The type shall be INTEGER.
1691    !    A2, A3, ...    -An expression of the same type and kind as A1.
1692    ! Return value:
1693    !    The return value corresponds to the maximum value among the arguments, and has the same type
1694    !    and kind as the first argument.
1695    ! Standard:
1696    !    Fortran 77 and later
1697    real :: AMIN0
1698    integer :: A1, A2
1699end function
1700
1701function AMIN1(A1, A2)
1702    ! This is specific name of MIN function.
1703	! Returns the argument with the smallest (most negative) value.
1704    ! Syntax:
1705    !    RESULT = MIN(A1, A2 [, A3, ...])
1706    ! Arguments:
1707    !    A1         -The type shall be REAL.
1708    !    A2, A3, ...    -An expression of the same type and kind as A1.
1709    ! Return value:
1710    !    The return value corresponds to the maximum value among the arguments, and has the same type
1711    !    and kind as the first argument.
1712    ! Standard:
1713    !    Fortran 77 and later
1714    real :: AMIN1, A1, A2
1715end function
1716
1717function MIN1(A1, A2)
1718    ! This is specific name of MIN function.
1719    ! MIN1 is equivalent to INT ( MIN ( . . . ) )
1720	! Returns the argument with the smallest (most negative) value.
1721    ! Syntax:
1722    !    RESULT = MIN(A1, A2 [, A3, ...])
1723    ! Arguments:
1724    !    A1         -The type shall be REAL.
1725    !    A2, A3, ...    -An expression of the same type and kind as A1.
1726    ! Return value:
1727    !    The return value corresponds to the maximum value among the arguments, and has the same type
1728    !    and kind as the first argument.
1729    ! Standard:
1730    !    Fortran 77 and later
1731    integer :: MIN1
1732    real :: A1, A2
1733end function
1734
1735function DMIN1(A1, A2)
1736    ! This is specific name of MIN function.
1737	! Returns the argument with the smallest (most negative) value.
1738    ! Syntax:
1739    !    RESULT = MIN(A1, A2 [, A3, ...])
1740    ! Arguments:
1741    !    A1         -The type shall be DOUBLE PRECISION.
1742    !    A2, A3, ...    -An expression of the same type and kind as A1.
1743    ! Return value:
1744    !    The return value corresponds to the maximum value among the arguments, and has the same type
1745    !    and kind as the first argument.
1746    ! Standard:
1747    !    Fortran 77 and later
1748    double precision :: DMIN1, A1, A2
1749end function
1750
1751function MINEXPONENT(X)
1752	! Returns the minimum exponent in the model of the type of X.
1753    ! Arguments:
1754    !    X  -Shall be of type REAL.
1755    ! Return value:
1756    !    The return value is of type INTEGER and of the default integer kind.
1757    ! Standard:
1758    !    Fortran 95 and later
1759    real :: X
1760    integer :: MINEXPONENT
1761end function
1762
1763function MINLOC(ARRAY [, DIM] [, MASK] [, KIND] [, BACK])
1764    ! Determines the location of the element in the array with the minimum value, or, if the DIM
1765    ! argument is supplied, determines the locations of the minimum element along each row of the
1766    ! array in the DIM direction. If MASK is present, only the elements for which MASK is .TRUE. are
1767    ! considered. If more than one element in the array has the minimum value, the location returned is
1768    ! that of the first such element in array element order. If the array has zero size, or all of the
1769    ! elements of MASK are .FALSE., then the result is an array of zeroes. Similarly, if DIM is supplied
1770    ! and all of the elements of MASK along a given row are zero, the result value for that row is zero.
1771    ! Syntax:
1772    !    RESULT = MINLOC(ARRAY, DIM [, MASK])
1773    !    RESULT = MINLOC(ARRAY [, MASK])
1774    ! Arguments:
1775    !    ARRAY  -Shall be an array of type INTEGER or REAL.
1776    !    DIM    -(Optional) Shall be a scalar of type INTEGER, with a value between one and the rank
1777    !             of ARRAY, inclusive. It may not be an optional dummy argument.
1778    !    MASK   -Shall be an array of type LOGICAL, and conformable with ARRAY.
1779    !    BACK   -LOGICAL
1780    ! Return value:
1781    !    If DIM is absent, the result is a rank-one array with a length equal to the rank of ARRAY.
1782    !    If DIM is present, the result is an array with a rank one less than the rank of ARRAY, and
1783    !    a size corresponding to the size of ARRAY with the DIM dimension removed. If DIM is present
1784    !    and ARRAY has a rank of one, the result is a scalar. In all cases, the result is of default INTEGER type.
1785    ! Standard:
1786    !    Fortran 95 and later
1787    integer or real :: ARRAY(:[,:,...])
1788    integer, optional :: DIM
1789    logical, optional :: MASK(:[,:,...])
1790    integer, optional :: KIND
1791    logical, optional :: BACK
1792    integer :: MINLOC(:[,:,...])
1793end function
1794
1795function MINVAL(ARRAY, DIM [, MASK])
1796	! Determines the minimum value of the elements in an array value, or, if the DIM argument is
1797	! supplied, determines the minimum value along each row of the array in the DIM direction.
1798	! If MASK is present, only the elements for which MASK is .TRUE. are considered. If the array
1799	! has zero size, or all of the elements of MASK are .FALSE., then the result is HUGE(ARRAY) if
1800	! ARRAY is numeric, or a string of CHAR(255) characters if ARRAY is of character type.
1801    ! Syntax:
1802    !    RESULT = MINVAL(ARRAY, DIM [, MASK])
1803    !    RESULT = MINVAL(ARRAY [, MASK])
1804    ! Arguments:
1805    !    ARRAY  -Shall be an array of type INTEGER or REAL.
1806    !    DIM    -(Optional) Shall be a scalar of type INTEGER, with a value between one and the rank of
1807    !             ARRAY, inclusive. It may not be an optional dummy argument.
1808    !    MASK   -Shall be an array of type LOGICAL, and conformable with ARRAY.
1809    !
1810    ! Return value:
1811    !    If DIM is absent, or if ARRAY has a rank of one, the result is a scalar. If DIM is present,
1812    !    the result is an array with a rank one less than the rank of ARRAY, and a size corresponding
1813    !    to the size of ARRAY with the DIM dimension removed. In all cases, the result is of the same
1814    !    type and kind as ARRAY.
1815    ! Standard:
1816    !    Fortran 95 and later
1817    integer or real :: ARRAY(:[,:,...])
1818    integer, optional :: DIM
1819    logical, optional :: MASK(:[,:,...])
1820    integer :: MINVAL(:[,:,...])
1821end function
1822
1823function MOD(A, P)
1824	! Computes the remainder of the division of A by P. It is calculated as A - (INT(A/P) * P).
1825    ! Arguments:
1826    !    A  -Shall be a scalar of type INTEGER or REAL
1827    !    P  -Shall be a scalar of the same type as A and not equal to zero
1828    ! Return value:
1829    !    The kind of the return value is the result of cross-promoting the kinds of the arguments.
1830    ! Standard:
1831    !    Fortran 77 and later
1832    integer or real :: A, P, MOD
1833end function
1834
1835function AMOD(A, P)
1836    ! This is specific name of MOD function.
1837	! Computes the remainder of the division of A by P. It is calculated as A - (INT(A/P) * P).
1838    ! Arguments:
1839    !    A  -Shall be a scalar of type default REAL
1840    !    P  -Shall be a scalar of the same type as A and not equal to zero
1841    ! Return value:
1842    !    The kind of the return value is the result of cross-promoting the kinds of the arguments.
1843    ! Standard:
1844    !    Fortran 77 and later
1845    real :: AMOD, A, P
1846end function
1847
1848function DMOD(A, P)
1849    ! This is specific name of MOD function.
1850	! Computes the remainder of the division of A by P. It is calculated as A - (INT(A/P) * P).
1851    ! Standard:
1852    !    Fortran 77 and later
1853    ! Arguments:
1854    !    A  -Shall be a scalar of type default DOUBLE PRECISION
1855    !    P  -Shall be a scalar of the same type as A and not equal to zero
1856    ! Return value:
1857    !    The kind of the return value is the result of cross-promoting the kinds of the arguments.
1858    double precision :: DMOD, A, P
1859end function
1860
1861function MODULO(A, P)
1862	! Computes the A modulo P.
1863    ! Arguments:
1864    !    A  -Shall be a scalar of type INTEGER or REAL
1865    !    P  -Shall be a scalar of the same type and kind as A
1866    ! Return value:
1867    !    The type and kind of the result are those of the arguments.
1868    !    If A and P are of type INTEGER:
1869    !        MODULO(A,P) has the value R such that A=Q*P+R, where Q is an integer and R is between
1870    !        0 (inclusive) and P (exclusive).
1871    !    If A and P are of type REAL:
1872    !        MODULO(A,P) has the value of A - FLOOR (A / P) * P.
1873    !    In all cases, if P is zero the result is processor-dependent.
1874    ! Standard:
1875    !    Fortran 95 and later
1876    integer or real :: A, P, MODULO
1877end function
1878
1879subroutine MOVE_ALLOC(FROM, TO[, STAT, ERRMSG])
1880	! Moves the allocation from FROM to TO. FROM will become deallocated in the process.
1881    ! Arguments:
1882    !    FROM   -ALLOCATABLE, INTENT(INOUT), may be of any type and kind.
1883    !    TO     -ALLOCATABLE, INTENT(OUT), shall be of the same type, kind and rank as FROM.
1884    ! Standard:
1885    !    Fortran 2003 and later
1886    type(any_type), allocatable :: FROM(:[,:,...]), TO(:[,:,...])
1887    integer, optional, intent(out) :: STAT
1888    character(len=*), optional, intent(inout) :: ERRMSG
1889end subroutine
1890
1891subroutine MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)
1892	! Moves LEN bits from positions FROMPOS through FROMPOS+LEN-1 of FROM to positions TOPOS
1893	! through TOPOS+LEN-1 of TO. The portion of argument TO not affected by the movement of bits
1894	! is unchanged. The values of FROMPOS+LEN-1 and TOPOS+LEN-1 must be less than BIT_SIZE(FROM).
1895    ! Arguments:
1896    !    FROM   -The type shall be INTEGER.
1897    !    FROMPOS    -The type shall be INTEGER.
1898    !    LEN    -The type shall be INTEGER.
1899    !    TO     -The type shall be INTEGER, of the same kind as FROM.
1900    !    TOPOS  -The type shall be INTEGER.
1901    ! Standard:
1902    !    Fortran 95 and later
1903    integer :: FROM, FROMPOS, LEN, TO, TOPOS
1904end subroutine
1905
1906function NEAREST(X, S)
1907	! Returns the processor-representable number nearest to X in the direction indicated by the sign of S.
1908    ! Standard:
1909    !    Fortran 95 and later
1910    ! Arguments:
1911    !    X  -Shall be of type REAL.
1912    !    S  -(Optional) shall be of type REAL and not equal to zero.
1913    ! Return value:
1914    !    The return value is of the same type as X. If S is positive, NEAREST returns the
1915    !    processor-representable number greater than X and nearest to it. If S is negative, NEAREST
1916    !    returns the processor-representable number smaller than X and nearest to it.
1917    real :: X, NEAREST
1918    real, optional :: S
1919end function
1920
1921function NEW_LINE(C)
1922	! Returns the new-line character.
1923    ! Arguments:
1924    !    C  -The argument shall be a scalar or array of the type CHARACTER.
1925    ! Return value:
1926    !    Returns a CHARACTER scalar of length one with the new-line character of the same kind as parameter C.
1927    ! Standard:
1928    !    Fortran 2003 and later
1929    character(len=*) :: C
1930    character(len=1) :: NEW_LINE
1931end function
1932
1933function NINT(A [, KIND])
1934    ! Rounds its argument to the nearest whole number.
1935    ! Arguments:
1936    !    A      -The type of the argument shall be REAL.
1937    !    KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1938    ! Return value:
1939    !    Returns A with the fractional portion of its magnitude eliminated by rounding to the nearest whole
1940    !    number and with its sign preserved, converted to an INTEGER of the default kind.
1941    ! Standard:
1942    !    Fortran 77 and later, with KIND argument Fortran 90 and later
1943    real :: A
1944    integer, optional :: KIND
1945    integer :: NINT
1946end function
1947
1948function IDNINT(A)
1949    ! This is specific name of NINT function.
1950    ! Rounds its argument to the nearest whole number.
1951    ! Arguments:
1952    !    A      -The type of the argument shall be DOUBLE PRECISION.
1953    !    KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
1954    ! Return value:
1955    !    Returns A with the fractional portion of its magnitude eliminated by rounding to the nearest whole
1956    !    number and with its sign preserved, converted to an INTEGER of the default kind.
1957    ! Standard:
1958    !    Fortran 77 and later, with KIND argument Fortran 90 and later
1959    integer :: IDNINT
1960    double precision :: A
1961    integer, optional :: KIND
1962end function
1963
1964function NOT(I)
1965	! Returns the bitwise boolean inverse of I.
1966    ! Arguments:
1967    !    I  -The type shall be INTEGER.
1968    ! Return value:
1969    !    The return type is INTEGER, of the same kind as the argument.
1970    ! Standard:
1971    !    Fortran 95 and later
1972    integer :: I, NOT
1973end function
1974
1975function NULL([MOLD])
1976    ! Returns a disassociated pointer.
1977    ! If MOLD is present, a dissassociated pointer of the same type is returned,
1978    ! otherwise the type is determined by context.
1979    ! In Fortran 95, MOLD is optional. Please note that Fortran 2003 includes cases
1980    ! where it is required.
1981    ! Syntax:
1982    !    PTR => NULL([MOLD])
1983    ! Arguments:
1984    !    MOLD   -(Optional) shall be a pointer of any association status and of any type.
1985    ! Return value:
1986    !    A disassociated pointer.
1987    ! Standard:
1988    !    Fortran 95 and later
1989    type(any_type), pointer, optional :: MOLD
1990end function
1991
1992function PACK(ARRAY, MASK [, VECTOR])
1993	! Stores the elements of ARRAY in an array of rank one.
1994    ! The beginning of the resulting array is made up of elements whose MASK equals TRUE.
1995    ! Afterwards, positions are filled with elements taken from VECTOR.
1996    ! Arguments:
1997    !    ARRAY  -Shall be an array of any type.
1998    !    MASK   -Shall be an array of type LOGICAL and of the same size as ARRAY. Alternatively,
1999    !            it may be a LOGICAL scalar.
2000    !    VECTOR -(Optional) shall be an array of the same type as ARRAY and of rank one. If present,
2001    !             the number of elements in VECTOR shall be equal to or greater than the number of
2002    !             true elements in MASK. If MASK is scalar, the number of elements in VECTOR shall be
2003    !             equal to or greater than the number of elements in ARRAY.
2004    ! Return value:
2005    !    The result is an array of rank one and the same type as that of ARRAY. If VECTOR is present,
2006    !    the result size is that of VECTOR, the number of TRUE values in MASK otherwise.
2007    ! Standard:
2008    !    Fortran 95 and later
2009    type(any_type) :: ARRAY(:[,:,...])
2010    logical :: MASK[(:,...)]
2011    type(same as ARRAY), optional :: VECTOR(:)
2012    type(same as ARRAY) :: PACK(:)
2013end function
2014
2015function PRECISION(X)
2016	! Returns the decimal precision in the model of the type of X.
2017    ! Arguments:
2018    !    X  -Shall be of type REAL or COMPLEX.
2019    ! Return value:
2020    !    The return value is of type INTEGER and of the default integer kind.
2021    ! Standard:
2022    !    Fortran 95 and later
2023    real or complex :: X
2024    integer :: PRECISION
2025end function
2026
2027function PRESENT(A)
2028    ! Determines whether an optional dummy argument is present.
2029    ! Arguments:
2030    !    A  -May be of any type and may be a pointer, scalar or array value, or a dummy procedure.
2031    !        It shall be the name of an optional dummy argument accessible within the current subroutine or function.
2032    ! Return value:
2033    !    Returns either TRUE if the optional argument A is present, or FALSE otherwise.
2034    ! Standard:
2035    !    Fortran 95 and later
2036    type(any_type) :: A
2037    logical :: PRESENT
2038end function
2039
2040function PRODUCT(ARRAY [, DIM] [, MASK])
2041	! Multiplies the elements of ARRAY along dimension DIM if the corresponding element in MASK is TRUE.
2042    ! Syntax:
2043    !    RESULT = PRODUCT(ARRAY[, MASK])
2044    !    RESULT = PRODUCT(ARRAY, DIM[, MASK])
2045    ! Arguments:
2046    !    ARRAY  -Shall be an array of type INTEGER, REAL or COMPLEX.
2047    !    DIM    -(Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n,
2048    !            where n equals the rank of ARRAY.
2049    !    MASK   -(Optional) shall be of type LOGICAL and either be a scalar or an array of the same shape as ARRAY.
2050    ! Return value:
2051    !    The result is of the same type as ARRAY.
2052    !    If DIM is absent, a scalar with the product of all elements in ARRAY is returned. Otherwise,
2053    !    an array of rank n-1, where n equals the rank of ARRAY, and a shape similar to that of ARRAY
2054    !    with dimension DIM dropped is returned.
2055    ! Standard:
2056    !    Fortran 95 and later
2057    integer, real or complex :: ARRAY(:[,:,...])
2058    integer :: DIM
2059end function
2060
2061function RADIX(X)
2062	! Returns the base of the model representing the entity X.
2063    ! Arguments:
2064    !    X  -Shall be of type INTEGER or REAL
2065    ! Return value:
2066    !    The return value is a scalar of type INTEGER and of the default integer kind.
2067    ! Standard:
2068    !    Fortran 95 and later
2069    integer or real :: X
2070    integer :: RADIX
2071end function
2072
2073subroutine RANDOM_NUMBER(HARVEST)
2074    ! Returns a single pseudorandom number or an array of pseudorandom numbers from the uniform distribution
2075    ! over the range 0 <= x < 1.
2076    ! Arguments:
2077    !    HARVEST    -Shall be a scalar or an array of type REAL.
2078    ! Standard:
2079    !    Fortran 95 and later
2080    real :: HARVEST[(:,...)]
2081end subroutine
2082
2083subroutine RANDOM_SEED([SIZE, PUT, GET])
2084	! Restarts or queries the state of the pseudorandom number generator used by RANDOM_NUMBER.
2085    ! If RANDOM_SEED is called without arguments, it is initialized to a default state.
2086    ! Arguments:
2087    !    SIZE   -(Optional) Shall be a scalar and of type default INTEGER, with INTENT(OUT).
2088    !            It specifies the minimum size of the arrays used with the PUT and GET arguments.
2089    !    PUT    -(Optional) Shall be an array of type default INTEGER and rank one. It is
2090    !             INTENT(IN) and the size of the array must be larger than or equal to the number
2091    !             returned by the SIZE argument.
2092    !    GET    -(Optional) Shall be an array of type default INTEGER and rank one. It is INTENT(OUT)
2093    !            and the size of the array must be larger than or equal to the number returned by the SIZE argument.
2094    ! Standard:
2095    !    Fortran 95 and later
2096    integer, optional, intent(out) :: SIZE
2097    integer, optional, intent(in) :: PUT(:)
2098    integer, optional, intent(out) :: GET(:)
2099end subroutine
2100
2101subroutine RANDOM_INIT(REPEATABLE, IMAGE_DISTINCT)
2102    ! Initialize the pseudorandom number generator.
2103    ! If REPEATABLE is .true., the seed accessed by the pseudorandom number generator is set
2104    ! to a processor-dependent value that is the same each time RANDOM_INIT is called
2105    ! from the same image. If it has the value .false., the seed is set to a processor-
2106    ! dependent, unpredictably different value on each call.
2107    ! If IMAGE_DISTINCT has the value .true., the seed accessed by the pseudorandom
2108    ! number generator is set to a processor-dependent value that is distinct from the
2109    ! value that would be set by a call to RANDOM_INIT by another image. If it has the
2110    ! value .false., the value to which the seed is set does not depend on which image calls.
2111    logical, intent(in) :: REPEATABLE
2112    logical, intent(in) :: IMAGE_DISTINCT
2113end subroutine
2114
2115function RANGE(X)
2116    ! Returns the decimal exponent range in the model of the type of X.
2117    ! Arguments:
2118    !    X  -Shall be of type INTEGER, REAL or COMPLEX.
2119    ! Return value:
2120    !    The return value is of type INTEGER and of the default integer kind.
2121    ! Standard:
2122    !    Fortran 95 and later
2123    INTEGER, REAL or COMPLEX :: X
2124    INTEGER :: RANGE
2125end function
2126
2127function REAL(A [, KIND])
2128	! Converts its argument A to a real type.
2129    ! Arguments:
2130    !    A      -Shall be INTEGER, REAL, or COMPLEX.
2131    !    KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
2132    ! Return value:
2133    !    These functions return a REAL variable or array under the following rules:
2134    !    (A)
2135    !        REAL(A) is converted to a default real type if A is an integer or real variable.
2136    !    (B)
2137    !        REAL(A) is converted to a real type with the kind type parameter of A if A is a complex variable.
2138    !    (C)
2139    !        REAL(A, KIND) is converted to a real type with kind type parameter KIND if A is a complex,
2140    !        integer, or real variable.
2141    ! Standard:
2142    !    Fortran 77 and later
2143    integer, real or complex :: A
2144    integer, optional :: KIND
2145    real[(KIND)] :: REAL
2146end function
2147
2148function FLOAT(A)
2149    ! This is specific name of REAL function.
2150	! Converts its argument A to a real type.
2151    ! Arguments:
2152    !    A      -Shall be default INTEGER.
2153    ! Standard:
2154    !    Fortran 77 and later
2155    real :: FLOAT
2156    integer :: A
2157end function
2158
2159function SAME_TYPE_AS(A,B)
2160	! Inquires whether the dynamic type of A is the same as the dynamic type of B.
2161	! Function returns true if the dynamic type of A is the same as the dynamic type of B.
2162    ! Arguments:
2163    ! A   -must be an object of extensible type. If it is a pointer, it must not have an undefined association status.
2164    ! B   -must be an object of extensible type. If it is a pointer, it must not have an undefined association status.
2165    ! Return value:
2166    ! Default LOGICAL scalar
2167    ! Standard:
2168    !    Fortran 2003 and later
2169    logical :: SAME_TYPE_AS
2170end function
2171
2172function SNGL(A)
2173    ! This is specific name of REAL function.
2174	! Converts its argument A to a real type.
2175    ! Arguments:
2176    !    A      -Shall be default DOUBLE PRECISION.
2177    ! Standard:
2178    !    Fortran 77 and later
2179    real :: SNGL
2180    double precision :: A
2181end function
2182
2183function REPEAT(STRING, NCOPIES)
2184	! Concatenates NCOPIES copies of a string.
2185    ! Arguments:
2186    !    STRING     -Shall be scalar and of type CHARACTER.
2187    !    NCOPIES    -Shall be scalar and of type INTEGER.
2188    ! Return value:
2189    !    A new scalar of type CHARACTER built up from NCOPIES copies of STRING.
2190    ! Standard:
2191    !    Fortran 95 and later
2192    character(len=*) :: REPEAT, STRING
2193    integer :: NCOPIES
2194end function
2195
2196function RESHAPE(SOURCE, SHAPE[, PAD, ORDER])
2197	! Reshapes SOURCE to correspond to SHAPE. If necessary, the new array may be padded with
2198	! elements from PAD or permuted as defined by ORDER.
2199    ! Arguments:
2200    !    SOURCE     -Shall be an array of any type.
2201    !    SHAPE      -Shall be of type INTEGER and an array of rank one. Its values must be positive or zero.
2202    !    PAD        -(Optional) shall be an array of the same type as SOURCE.
2203    !    ORDER      -(Optional) shall be of type INTEGER and an array of the same shape as SHAPE. Its values
2204    !                 shall be a permutation of the numbers from 1 to n, where n is the size of SHAPE. If
2205    !                 ORDER is absent, the natural ordering shall be assumed.
2206    ! Return value:
2207    !    The result is an array of shape SHAPE with the same type as SOURCE.
2208    ! Standard:
2209    !    Fortran 95 and later
2210    type(any_type) :: SOURCE(:[,:,...])
2211    integer :: SHAPE(:)
2212    type(any_type), optional :: PAD(:[,:,...])
2213    integer, optional :: ORDER(:)
2214end function
2215
2216function RRSPACING(X)
2217	! Returns the reciprocal of the relative spacing of model numbers near X.
2218    ! Arguments:
2219    !    X  -Shall be of type REAL.
2220    ! Return value:
2221    !    The return value is of the same type and kind as X. The value returned is equal
2222    !    to ABS(FRACTION(X)) * FLOAT(RADIX(X))**DIGITS(X).
2223    ! Standard:
2224    !    Fortran 95 and later
2225    real :: X, RRSPACING
2226end function
2227
2228function SCALE(X, I)
2229	! Returns X * RADIX(X)**I.
2230    ! Arguments:
2231    !    X  -The type of the argument shall be a REAL.
2232    !    I  -The type of the argument shall be a INTEGER.
2233    ! Return value:
2234    !    The return value is of the same type and kind as X. Its value is X * RADIX(X)**I.
2235    ! Standard:
2236    !    Fortran 95 and later
2237    real :: X, SCALE
2238    integer :: I
2239end function
2240
2241function SCAN(STRING, SET[, BACK [, KIND]])
2242    ! Scans a STRING for any of the characters in a SET of characters.
2243    ! If BACK is either absent or equals FALSE, this function returns the position of the leftmost
2244    ! character of STRING that is in SET. If BACK equals TRUE, the rightmost position is returned.
2245    ! If no character of SET is found in STRING, the result is zero.
2246    ! Arguments:
2247    !    STRING     -Shall be of type CHARACTER.
2248    !    SET        -Shall be of type CHARACTER.
2249    !    BACK       -(Optional) shall be of type LOGICAL.
2250    !    KIND       -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
2251    ! Return value:
2252    !    The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value
2253    !    is of default integer kind.
2254    ! Standard:
2255    !    Fortran 95 and later, with KIND argument Fortran 2003 and later
2256    character(len=*) :: STRING, SET
2257    logical, optional :: BACK
2258    integer, optional :: KIND
2259end function
2260
2261function SELECTED_CHAR_KIND(NAME)
2262    ! Returns the kind value for the character set named NAME, if a character set with such a name
2263    ! is supported, or -1 otherwise.
2264    ! Arguments:
2265    !    NAME 	Shall be a scalar and of the default character type.
2266    ! Standard:
2267    !    Fortran 2003 and later
2268    character(len=*) :: NAME
2269    integer :: SELECTED_CHAR_KIND
2270end function
2271
2272function SELECTED_INT_KIND(R)
2273    ! Return the kind value of the smallest integer type that can represent all values ranging
2274    ! from -10^R (exclusive) to 10^R (exclusive). If there is no integer kind that accommodates
2275    ! this range, SELECTED_INT_KIND returns -1.
2276    ! Arguments:
2277    !    R   -Shall be a scalar and of type INTEGER.
2278    ! Standard:
2279    !    Fortran 95 and later
2280    integer :: R
2281    integer :: SELECTED_INT_KIND
2282end function
2283
2284function SELECTED_REAL_KIND([P, R, RADIX])
2285    ! Returns the kind value of a real data type with decimal precision of at least P digits and
2286    ! exponent range greater at least R.
2287    ! Arguments:
2288    !    P    -(Optional) shall be a scalar and of type INTEGER.
2289    !    R    -(Optional) shall be a scalar and of type INTEGER.
2290    !    RADIX -(Optional) shall be a scalar and of type INTEGER.
2291    ! Return value:
2292    !    SELECTED_REAL_KIND returns the value of the kind type parameter of a real data type with
2293    !    decimal precision of at least P digits and a decimal exponent range of at least R.
2294    !    If more than one real data type meet the criteria, the kind of the data type with the smallest
2295    !    decimal precision is returned. If no real data type matches the criteria, the result is
2296    !
2297    !    -1 if the processor does not support a real data type with a
2298    !        precision greater than or equal to P
2299    !    -2 if the processor does not support a real type with an exponent
2300    !        range greater than or equal to R
2301    !    -3 if neither is supported.
2302    ! Standard:
2303    !    Fortran 95 and later
2304    integer, optional :: P, R, RADIX
2305    integer :: SELECTED_REAL_KIND
2306end function
2307
2308function SET_EXPONENT(X, I)
2309    ! Returns the real number whose fractional part is that of X and whose exponent part is I.
2310    ! Arguments:
2311    !    X      -Shall be of type REAL.
2312    !    I      -Shall be of type INTEGER.
2313    ! Return value:
2314    !    The return value is of the same type and kind as X. The real number whose fractional part
2315    !    is that that of X and whose exponent part if I is returned; it is FRACTION(X) * RADIX(X)**I.
2316    ! Standard:
2317    !    Fortran 95 and later
2318    real :: X
2319    integer :: I
2320end function
2321
2322function SHAPE(SOURCE [, KIND])
2323    ! Determines the shape of an array.
2324    ! Arguments:
2325    !    SOURCE     -Shall be an array or scalar of any type. If SOURCE is a pointer it must be
2326    !                associated and allocatable arrays must be allocated.
2327    ! Return value:
2328    !    An INTEGER array of rank one with as many elements as SOURCE has dimensions. The elements
2329    !    of the resulting array correspond to the extend of SOURCE along the respective dimensions.
2330    !    If SOURCE is a scalar, the result is the rank one array of size zero.
2331    ! Standard:
2332    !    Fortran 95 and later
2333    type(any_type) :: SOURCE[(:,...)]
2334    integer :: KIND
2335    integer :: SHAPE(:)
2336end function
2337
2338function SIGN(A, B)
2339    ! Returns the value of A with the sign of B.
2340    ! Arguments:
2341    !    A      -Shall be of type INTEGER or REAL
2342    !    B      -Shall be of the same type and kind as A
2343    ! Return value:
2344    !    The kind of the return value is that of A and B. If B >= 0 then the result is ABS(A),
2345    !    else it is -ABS(A).
2346    ! Standard:
2347    !    Fortran 77 and later
2348    integer or real :: A, B
2349end function
2350
2351function DSIGN(A, B)
2352    ! This is specific name of SIGN function.
2353    ! Returns the value of A with the sign of B.
2354    ! Arguments:
2355    !    A      -Shall be of type DOUBLE PRECISION
2356    !    B      -Shall be of the same type and kind as A
2357    ! Return value:
2358    !    The kind of the return value is that of A and B. If B >= 0 then the result is ABS(A),
2359    !    else it is -ABS(A).
2360    ! Standard:
2361    !    Fortran 77 and later
2362    double precision :: DSIGN, A, B
2363end function
2364
2365function ISIGN(A, B)
2366    ! This is specific name of SIGN function.
2367    ! Returns the value of A with the sign of B.
2368    ! Arguments:
2369    !    A      -Shall be of type default INTEGER
2370    !    B      -Shall be of the same type and kind as A
2371    ! Return value:
2372    !    The kind of the return value is that of A and B. If B >= 0 then the result is ABS(A),
2373    !    else it is -ABS(A).
2374    ! Standard:
2375    !    Fortran 77 and later
2376    integer :: ISIGN, A, B
2377end function
2378
2379function SIN(X)
2380    ! Computes the sine of X.
2381    ! Arguments:
2382    !    X      -The type shall be REAL or COMPLEX.
2383    ! Return value:
2384    !    The return value has same type and kind as X.
2385    ! Standard:
2386    !    Fortran 77 and later
2387    real or complex :: X, SIN
2388end function
2389
2390function CSIN(X)
2391    ! This is specific name of SIN function.
2392    ! Computes the sine of X.
2393    ! Arguments:
2394    !    X      -The type shall be COMPLEX.
2395    ! Return value:
2396    !    The return value has same type and kind as X.
2397    ! Standard:
2398    !    Fortran 77 and later
2399    complex :: CSIN, X
2400end function
2401
2402function DSIN(X)
2403    ! This is specific name of SIN function.
2404    ! Computes the sine of X.
2405    ! Arguments:
2406    !    X      -The type shall be DOUBLE PRECISION.
2407    ! Return value:
2408    !    The return value has same type and kind as X.
2409    ! Standard:
2410    !    Fortran 77 and later
2411    double precision :: DSIN, X
2412end function
2413
2414function SINH(X)
2415    ! Computes the hyperbolic sine of X.
2416    ! Arguments:
2417    !    X   -The type shall be REAL or COMPLEX.
2418    ! Return value:
2419    !    The return value has same type and kind as X.
2420    ! Standard:
2421    !    Fortran 95 and later, for a complex argument Fortran 2008 or later
2422    real or complex :: X, SINH
2423end function
2424
2425function DSINH(X)
2426    ! Computes the hyperbolic sine of X.
2427    ! Arguments:
2428    !    X   -The type shall be DOUBLE PRECISION.
2429    ! Return value:
2430    !    The return value has same type and kind as X.
2431    ! Standard:
2432    !    Fortran 95 and later
2433    double precision :: DSINH, X
2434end function
2435
2436function SIZE(ARRAY[, DIM [, KIND]])
2437    ! Determine the extent of ARRAY along a specified dimension DIM, or the total number of elements
2438    ! in ARRAY if DIM is absent.
2439    ! Arguments:
2440    !    ARRAY    -Shall be an array of any type. If ARRAY is a pointer it must be associated and
2441    !              allocatable arrays must be allocated.
2442    !    DIM      -(Optional) shall be a scalar of type INTEGER and its value shall be in the range
2443    !               from 1 to n, where n equals the rank of ARRAY.
2444    !    KIND     -(Optional) An INTEGER initialization expression indicating the kind parameter
2445    !               of the result.
2446    ! Return value:
2447    !    The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value
2448    !    is of default integer kind.
2449    ! Standard:
2450    !    Fortran 95 and later, with KIND argument Fortran 2003 and later
2451    type(any_type) :: ARRAY[(:,...)] ! array of any type
2452    integer, optional :: DIM, KIND
2453    integer :: SIZE
2454end function
2455
2456function SNGL(A)
2457    ! Converts the double precision real A to a default real value. This is an archaic form of REAL
2458    ! that is specific to one type for A.
2459    ! Arguments:
2460    !    A 	The type shall be a double precision REAL.
2461    ! Return value:
2462    !    The return value is of type default REAL.
2463    ! Standard:
2464    !    Fortran 77 and later
2465    double precision :: A
2466    real :: SNGL
2467end function
2468
2469function SPACING(X)
2470    ! Determines the distance between the argument X and the nearest adjacent number of the same type.
2471    ! Arguments:
2472    !    X 	Shall be of type REAL.
2473    ! Return value:
2474    !    The result is of the same type as the input argument X.
2475    ! Standard:
2476    !    Fortran 95 and later
2477    real :: X, SPACING
2478end function
2479
2480function SPREAD(SOURCE, DIM, NCOPIES)
2481    ! Replicates a SOURCE array NCOPIES times along a specified dimension DIM.
2482    ! Arguments:
2483    !    SOURCE     -Shall be a scalar or an array of any type and a rank less than seven.
2484    !    DIM        -Shall be a scalar of type INTEGER with a value in the range from 1 to n+1,
2485    !                 where n equals the rank of SOURCE.
2486    !    NCOPIES    -Shall be a scalar of type INTEGER.
2487    ! Return value:
2488    !    The result is an array of the same type as SOURCE and has rank n+1 where n equals the rank of SOURCE.
2489    ! Standard:
2490    !    Fortran 95 and later
2491    type(any_type) :: SOURCE[(:,...)]
2492    integer :: DIM, NCOPIES
2493    type(same_as_SOURCE) :: SPREAD(:[,:,...])
2494end function
2495
2496function SQRT(X)
2497    ! Computes the square root of X.
2498    ! Arguments:
2499    !    X      -The type shall be REAL or COMPLEX.
2500    ! Return value:
2501    !    The return value is of type REAL or COMPLEX. The kind type parameter is the same as X.
2502    ! Standard:
2503    !    Fortran 77 and later
2504    real or complex :: X, SQRT
2505end function
2506
2507function CSQRT(X)
2508    ! This is specific name of SQRT function.
2509    ! Computes the square root of X.
2510    ! Arguments:
2511    !    X      -The type shall be COMPLEX.
2512    ! Return value:
2513    !    The return value is of type COMPLEX.
2514    ! Standard:
2515    !    Fortran 77 and later
2516    complex :: CSQRT, X
2517end function
2518
2519function DSQRT(X)
2520    ! This is specific name of SQRT function.
2521    ! Computes the square root of X.
2522    ! Arguments:
2523    !    X      -The type shall be DOUBLE PRECISION.
2524    ! Return value:
2525    !    The return value is of type DOUBLE PRECISION.
2526    ! Standard:
2527    !    Fortran 77 and later
2528    double precision :: DSQRT, X
2529end function
2530
2531function SUM(ARRAY[, DIM] [, MASK])
2532    ! Adds the elements of ARRAY along dimension DIM if the corresponding element in MASK is TRUE.
2533    ! Syntax:
2534    !    RESULT = SUM(ARRAY[, MASK])
2535    !    RESULT = SUM(ARRAY, DIM[, MASK])
2536    ! Arguments:
2537    !    ARRAY  -Shall be an array of type INTEGER, REAL or COMPLEX.
2538    !    DIM    -(Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n,
2539    !             where n equals the rank of ARRAY.
2540    !    MASK   -(Optional) shall be of type LOGICAL and either be a scalar or an array of the same shape as ARRAY.
2541    ! Return value:
2542    !    The result is of the same type as ARRAY.
2543    !    If DIM is absent, a scalar with the sum of all elements in ARRAY is returned. Otherwise,
2544    !    an array of rank n-1, where n equals the rank of ARRAY,and a shape similar to that of ARRAY with
2545    !    dimension DIM dropped is returned.
2546    ! Standard:
2547    !    Fortran 95 and later
2548    integer, real or complex :: ARRAY(:[,:,...])
2549    integer, optional :: DIM
2550    logical :: MASK(:[,:,...])
2551end function
2552
2553subroutine SYSTEM_CLOCK([COUNT, COUNT_RATE, COUNT_MAX])
2554    ! Determines the COUNT of milliseconds of wall clock time. COUNT_RATE determines the number of clock
2555    ! ticks per second or zero if there is no processor clock. COUNT_MAX is assigned the maximum value of COUNT,
2556    ! if a processor clock is available, or otherwise, zero.
2557    !Arguments:
2558    !    COUNT  -(Optional) shall be a scalar of type default INTEGER with INTENT(OUT).
2559    !    COUNT_RATE     -(Optional) shall be a scalar of type default INTEGER with INTENT(OUT).
2560    !    COUNT_MAX  -(Optional) shall be a scalar of type default INTEGER with INTENT(OUT).
2561    ! Standard:
2562    !    Fortran 95 and later
2563    integer, optional, intent(out) :: COUNT, COUNT_RATE, COUNT_MAX
2564end subroutine
2565
2566function TAN(X)
2567    ! Computes the tangent of X.
2568    ! Arguments:
2569    !    X  -The type shall be REAL or COMPLEX.
2570    ! Return value:
2571    !    The return value has same type and kind as X.
2572    ! Standard:
2573    !    Fortran 77 and later, for a complex argument Fortran 2008 or later
2574    real or complex :: X, TAN
2575end function
2576
2577function DTAN(X)
2578    ! This is specific name of TAN function.
2579    ! Computes the tangent of X.
2580    ! Arguments:
2581    !    X  -The type shall be DOUBLE PRECISION.
2582    ! Return value:
2583    !    The return value has same type and kind as X.
2584    ! Standard:
2585    !    Fortran 77 and later
2586    double precision :: DTAN, X
2587end function
2588
2589function TANH(X)
2590    ! Computes the hyperbolic tangent of X.
2591    ! Arguments:
2592    !    X 	The type shall be REAL or COMPLEX.
2593    ! Return value:
2594    !    The return value has same type and kind as X. If X is complex, the imaginary part of the result
2595    !    is in radians. If X is REAL, the return value lies in the range - 1 <= tanh(x) <= 1 .
2596    ! Standard:
2597    !    Fortran 77 and later, for a complex argument Fortran 2008 or later
2598    real or complex :: X, TANH
2599end function
2600
2601function DTANH(X)
2602    ! This is specific name of TANH function.
2603    ! Computes the hyperbolic tangent of X.
2604    ! Arguments:
2605    !    X 	The type shall be DOUBLE PRECISION.
2606    ! Return value:
2607    !    The return value has same type and kind as X.
2608    !    If X is REAL, the return value lies in the range - 1 <= tanh(x) <= 1 .
2609    ! Standard:
2610    !    Fortran 77 and later
2611    double precision :: DTANH, X
2612end function
2613
2614function TINY(X)
2615    ! Returns the smallest positive (non zero) number in the model of the type of X.
2616    ! Arguments:
2617    !    X  -Shall be of type REAL.
2618    ! Return value:
2619    !    The return value is of the same type and kind as X
2620    ! Standard:
2621    !    Fortran 95 and later
2622    real :: X, TINY
2623end function
2624
2625function TRAILZ(I)
2626    ! Returns the number of trailing zero bits of an integer.
2627    ! Arguments:
2628    !    I  -Shall be of type INTEGER.
2629    ! Return value:
2630    !    The type of the return value is the default INTEGER. If all the bits of I are zero,
2631    !    the result value is BIT_SIZE(I).
2632    ! Standard:
2633    !    Fortran 2008 and later
2634    integer :: I, TRAILZ
2635end function
2636
2637function TRANSFER(SOURCE, MOLD[, SIZE])
2638    ! Interprets the bitwise representation of SOURCE in memory as if it is the representation of a variable
2639    ! or array of the same type and type parameters as MOLD.
2640    ! This is approximately equivalent to the C concept of casting one type to another.
2641    ! Arguments:
2642    !    SOURCE     -Shall be a scalar or an array of any type.
2643    !    MOLD       -Shall be a scalar or an array of any type.
2644    !    SIZE       -(Optional) shall be a scalar of type INTEGER.
2645    ! Return value:
2646    !    The result has the same type as MOLD, with the bit level representation of SOURCE. If SIZE is present,
2647    !    the result is a one-dimensional array of length SIZE. If SIZE is absent but MOLD is an array
2648    !    (of any size or shape), the result is a one- dimensional array of the minimum length needed to contain the
2649    !    entirety of the bitwise representation of SOURCE. If SIZE is absent and MOLD is a scalar, the result is a scalar.
2650    !
2651    !    If the bitwise representation of the result is longer than that of SOURCE, then the leading bits of the result
2652    !    correspond to those of SOURCE and any trailing bits are filled arbitrarily.
2653    !
2654    !    When the resulting bit representation does not correspond to a valid representation of a variable of the same
2655    !    type as MOLD, the results are undefined, and subsequent operations on the result cannot be guaranteed to produce
2656    !    sensible behavior. For example, it is possible to create LOGICAL variables for which VAR and .NOT.VAR both
2657    !    appear to be true.
2658    ! Standard:
2659    !    Fortran 95 and later
2660    type(any_type) :: SOURCE[(:,...)], MOLD[(:,...)]
2661    integer :: SIZE
2662end function
2663
2664function TRANSPOSE(MATRIX)
2665    ! Transpose an array of rank two. Element (i, j) of the result has the value MATRIX(j, i), for all i, j.
2666    ! Arguments:
2667    !    MATRIX     -Shall be an array of any type and have a rank of two.
2668    ! Return value:
2669    !    The result has the same type as MATRIX, and has shape (/ m, n /) if MATRIX has shape (/ n, m /).
2670    ! Standard:
2671    !    Fortran 95 and later
2672    type(any_type) :: MATRIX(:,:), TRANSPOSE(:,:)
2673end function
2674
2675function TRIM(STRING)
2676    ! Removes trailing blank characters of a string.
2677    ! Arguments:
2678    !    STRING     -Shall be a scalar of type CHARACTER.
2679    ! Return value:
2680    !    A scalar of type CHARACTER which length is that of STRING less the number of trailing blanks.
2681    ! Standard:
2682    !    Fortran 95 and later
2683    character(len=*) :: TRIM, STRING
2684end function
2685
2686function UBOUND(ARRAY [, DIM [, KIND]])
2687    ! Returns the upper bounds of an array, or a single upper bound along the DIM dimension.
2688    ! Arguments:
2689    !    ARRAY  -Shall be an array, of any type.
2690    !    DIM    -(Optional) Shall be a scalar INTEGER.
2691    !    KIND   -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
2692    ! Return value:
2693    !    The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of
2694    !    default integer kind. If DIM is absent, the result is an array of the upper bounds of ARRAY.
2695    !    If DIM is present, the result is a scalar corresponding to the upper bound of the array along that
2696    !    dimension. If ARRAY is an expression rather than a whole array or array structure component, or if
2697    !    it has a zero extent along the relevant dimension, the upper bound is taken to be the number of
2698    !    elements along the relevant dimension.
2699    ! Standard:
2700    !    Fortran 95 and later, with KIND argument Fortran 2003 and later
2701    type(any_type) :: ARRAY(:[,...])
2702    integer, optional :: DIM, KIND
2703    integer(KIND) :: UBOUND
2704end function
2705
2706function UNPACK(VECTOR, MASK, FIELD)
2707    ! Store the elements of VECTOR in an array of higher rank.
2708    ! Arguments:
2709    !    VECTOR     -Shall be an array of any type and rank one. It shall have at least as many
2710    !                elements as MASK has TRUE values.
2711    !    MASK       -Shall be an array of type LOGICAL.
2712    !    FIELD      -Shall be of the same type as VECTOR and have the same shape as MASK.
2713    ! Return value:
2714    !    The resulting array corresponds to FIELD with TRUE elements of MASK replaced by values
2715    !    from VECTOR in array element order.
2716    ! Standard:
2717    !    Fortran 95 and later
2718    type(any_type) :: VECTOR(:)
2719    logical :: MASK(:[,:,...])
2720    type(same_as_VECTOR) :: FIELD(:[,:,...])
2721    type(same_as_VECTOR) :: UNPACK(:[,:,...])
2722end function
2723
2724function VERIFY(STRING, SET[, BACK [, KIND]])
2725    ! Verifies that all the characters in a SET are present in a STRING.
2726    ! If BACK is either absent or equals FALSE, this function returns the position of the leftmost character
2727    ! of STRING that is not in SET. If BACK equals TRUE, the rightmost position is returned. If all
2728    ! characters of SET are found in STRING, the result is zero.
2729    ! Arguments:
2730    !    STRING     -Shall be of type CHARACTER.
2731    !    SET        -Shall be of type CHARACTER.
2732    !    BACK       -(Optional) shall be of type LOGICAL.
2733    !    KIND       -(Optional) An INTEGER initialization expression indicating the kind parameter of the result.
2734    ! Return value:
2735    !    The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of
2736    !    default integer kind.
2737    ! Standard:
2738    !    Fortran 95 and later, with KIND argument Fortran 2003 and later
2739    integer(KIND=KIND) :: VERIFY
2740    character(len=*) :: STRING, SET
2741    logical, optional :: BACK
2742    integer, optional :: KIND
2743end function
2744
2745function EXTENDS_TYPE_OF (A, MOLD)
2746    ! Inquires whether the dynamic type of A is an extension type of the dynamic type of MOLD.
2747    ! If MOLD is unlimited polymorphic and is a disassociated pointer or unallocated allocatable, the result is true.
2748    ! If A is unlimited polymorphic and is either a disassociated pointer or unallocated allocatable, the result is false.
2749    ! If the dynamic type of A is an extension type of the dynamic type of MOLD, the result is true.
2750    ! In other cases, the result is false.
2751    ! Arguments:
2752    ! A  -object of extensible type. If A is a pointer, A must not have an undefined association status.
2753    ! MOLD   -object of extensible type. If MOLD is a pointer, MOLD must not have an undefined association status.
2754    ! Return value:
2755    !    The return value is default logical
2756    ! Standard:
2757    !   Fortran 2003 and later
2758    logical :: EXTENDS_TYPE_OF
2759    type(any_extensible_type) :: A, MOLD
2760end function
2761
2762function BGE (I, J)
2763    ! Determines whether an integral is a bitwise greater than or equal to another.
2764    ! Arguments:
2765    ! I    Shall be of INTEGER type.
2766    ! J    Shall be of INTEGER type, and of the same kind as I.
2767    ! Return value:
2768    !    The return value is default logical
2769    ! Standard:
2770    !   Fortran 2008 and later
2771    integer :: I, J
2772end function
2773
2774function BGT (I, J)
2775    ! Determines whether an integral is a bitwise greater than another.
2776    ! Arguments:
2777    ! I    Shall be of INTEGER type.
2778    ! J    Shall be of INTEGER type, and of the same kind as I.
2779    ! Return value:
2780    !    The return value is default logical
2781    ! Standard:
2782    !   Fortran 2008 and later
2783    integer :: I, J
2784end function
2785
2786function BLE (I, J)
2787    ! Determines whether an integral is a bitwise less than or equal to another.
2788    ! Arguments:
2789    ! I    Shall be of INTEGER type.
2790    ! J    Shall be of INTEGER type, and of the same kind as I.
2791    ! Return value:
2792    !    The return value is default logical
2793    ! Standard:
2794    !   Fortran 2008 and later
2795    integer :: I, J
2796end function
2797
2798function BLT (I, J)
2799    ! Determines whether an integral is a bitwise less than another.
2800    ! Arguments:
2801    ! I    Shall be of INTEGER type.
2802    ! J    Shall be of INTEGER type, and of the same kind as I.
2803    ! Return value:
2804    !    The return value is default logical
2805    ! Standard:
2806    !   Fortran 2008 and later
2807    integer :: I, J
2808end function
2809
2810function DSHIFTL (I, J, SHIFT)
2811    ! Combines bits of I and J. The rightmost SHIFT bits of the result are the leftmost SHIFT bits of J,
2812    ! and the remaining bits are the rightmost bits of I.
2813    ! Arguments:
2814    ! I    Shall be of type INTEGER or a BOZ constant.
2815    ! J    Shall be of type INTEGER or a BOZ constant. If both I and J have integer type,
2816    !      then they shall have the same kind type parameter. I and J shall not both be BOZ constants.
2817    ! SHIFT Shall be of type INTEGER. It shall be nonnegative. If I is not a BOZ constant,
2818    !      then SHIFT shall be less than or equal to BIT_SIZE(I); otherwise, SHIFT shall be less than or equal to BIT_SIZE(J).
2819    ! Return value:
2820    !    If either I or J is a BOZ constant, it is first converted as if by the intrinsic function INT
2821    !    to an integer type with the kind type parameter of the other.
2822    ! Standard:
2823    !   Fortran 2008 and later
2824    integer :: I, J, SHIFT
2825end function
2826
2827function DSHIFTR (I, J, SHIFT)
2828    ! Combines bits of I and J. The leftmost SHIFT bits of the result are the rightmost SHIFT bits of I,
2829    ! and the remaining bits are the leftmost bits of J.
2830    ! Arguments:
2831    ! I    Shall be of type INTEGER or a BOZ constant.
2832    ! J    Shall be of type INTEGER or a BOZ constant. If both I and J have integer type, then they shall
2833    !      have the same kind type parameter. I and J shall not both be BOZ constants.
2834    ! SHIFT Shall be of type INTEGER. It shall be nonnegative. If I is not a BOZ constant,
2835    !      then SHIFT shall be less than or equal to BIT_SIZE(I); otherwise, SHIFT shall be less than or equal to BIT_SIZE(J).
2836    ! Return value:
2837    !    If either I or J is a BOZ constant, it is first converted as if by the intrinsic function INT
2838    !    to an integer type with the kind type parameter of the other.
2839    ! Standard:
2840    !   Fortran 2008 and later
2841    integer :: I, J, SHIFT
2842end function
2843
2844function POPCNT (I)
2845    ! Returns the number of bits set ('1' bits) in the binary representation of I.
2846    ! Arguments:
2847    ! I    Shall be of type INTEGER.
2848    ! Return value:
2849    !    The return value is of type INTEGER and of the default integer kind.
2850    ! Standard:
2851    !   Fortran 2008 and later
2852    integer :: I
2853end function
2854
2855function POPPAR (I)
2856    ! Returns parity of the integer I, i.e. the parity of the number of bits set ('1' bits) in the binary
2857    ! representation of I. It is equal to 0 if I has an even number of bits set, and 1 for an odd number
2858    ! of '1' bits.
2859    ! Arguments:
2860    ! I    Shall be of type INTEGER.
2861    ! Return value:
2862    !    The return value is of type INTEGER and of the default integer kind.
2863    ! Standard:
2864    !   Fortran 2008 and later
2865    integer :: I
2866end function
2867
2868function MASKL(I[, KIND])
2869    ! Sets its leftmost I bits to 1, and the remaining bits sets to 0.
2870    ! Arguments:
2871    ! I     Shall be of type INTEGER.
2872    ! KIND  Shall be a scalar constant expression of type INTEGER.
2873    ! Return value:
2874    !    The return value is of type INTEGER. If KIND is present, it specifies the kind value
2875    !    of the return type; otherwise, it is of the default integer kind.
2876    ! Standard:
2877    !   Fortran 2008 and later
2878    integer :: I
2879    integer, optional :: KIND
2880end function
2881
2882function MASKR(I[, KIND])
2883    ! Sets its rightmost I bits to 1, and the remaining bits sets to 0.
2884    ! Arguments:
2885    ! I     Shall be of type INTEGER.
2886    ! KIND  Shall be a scalar constant expression of type INTEGER.
2887    ! Return value:
2888    !    The return value is of type INTEGER. If KIND is present, it specifies the kind value
2889    !    of the return type; otherwise, it is of the default integer kind.
2890    ! Standard:
2891    !   Fortran 2008 and later
2892    integer :: I
2893    integer, optional :: KIND
2894end function
2895
2896function SHIFTA(I, SHIFT)
2897    ! Returns a value corresponding to I with all of the bits shifted right by SHIFT places.
2898    ! If the absolute value of SHIFT is greater than BIT_SIZE(I), the value is undefined.
2899    ! Bits shifted out from the right end are lost. The fill is arithmetic:
2900    ! the bits shifted in from the left end are equal to the leftmost bit, which in two's
2901    ! complement representation is the sign bit.
2902    ! Arguments:
2903    ! I     The type shall be INTEGER.
2904    ! SHIFT The type shall be INTEGER.
2905    ! Return value:
2906    !    The return value is of type INTEGER and of the same kind as I.
2907    ! Standard:
2908    !   Fortran 2008 and later
2909    integer :: I, SHIFT
2910end function
2911
2912function SHIFTL(I, SHIFT)
2913    ! Returns a value corresponding to I with all of the bits shifted left by SHIFT places.
2914    ! If the absolute value of SHIFT is greater than BIT_SIZE(I), the value is undefined.
2915    ! Bits shifted out from the left end are lost, and bits shifted in from the right end are set to 0.
2916    ! Arguments:
2917    ! I     The type shall be INTEGER.
2918    ! SHIFT The type shall be INTEGER.
2919    ! Return value:
2920    !    The return value is of type INTEGER and of the same kind as I.
2921    ! Standard:
2922    !   Fortran 2008 and later
2923    integer :: I, SHIFT
2924end function
2925
2926function SHIFTR(I, SHIFT)
2927    ! Returns a value corresponding to I with all of the bits shifted right by SHIFT places.
2928    ! If the absolute value of SHIFT is greater than BIT_SIZE(I), the value is undefined.
2929    ! Bits shifted out from the right end are lost, and bits shifted in from the left end are set to 0.
2930    ! Arguments:
2931    ! I     The type shall be INTEGER.
2932    ! SHIFT The type shall be INTEGER.
2933    ! Return value:
2934    !    The return value is of type INTEGER and of the same kind as I.
2935    ! Standard:
2936    !   Fortran 2008 and later
2937    integer :: I, SHIFT
2938end function
2939
2940
2941function MERGE_BITS(I, J, MASK)
2942    ! Merges the bits of I and J as determined by the mask. The i-th bit of the result is equal to
2943    ! the i-th bit of I if the i-th bit of MASK is 1; it is equal to the i-th bit of J otherwise.
2944    ! Arguments:
2945    ! I     Shall be of type INTEGER.
2946    ! J     Shall be of type INTEGER and of the same kind as I.
2947    ! MASK  Shall be of type INTEGER and of the same kind as I.
2948    ! Return value:
2949    !    The result is of the same type and kind as I.
2950    ! Standard:
2951    !   Fortran 2008 and later
2952    integer :: I, J, MASK
2953end function
2954
2955function IALL(ARRAY[, DIM] [, MASK])
2956    ! Reduces with bitwise AND the elements of ARRAY along dimension DIM if the corresponding element
2957    ! in MASK is TRUE.
2958    ! Arguments:
2959    ! ARRAY   Shall be an array of type INTEGER
2960    ! DIM    (Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n, where n equals the rank of ARRAY.
2961    ! MASK   (Optional) shall be of type LOGICAL and either be a scalar or an array of the same shape as ARRAY.
2962    ! Return value:
2963    !    The result is of the same type as ARRAY.
2964    !    If DIM is absent, a scalar with the bitwise ALL of all elements in ARRAY is returned. Otherwise,
2965    !    an array of rank n-1, where n equals the rank of ARRAY, and a shape similar to that of ARRAY with
2966    !    dimension DIM dropped is returned.
2967    ! Standard:
2968    !   Fortran 2008 and later
2969    integer :: ARRAY(:[,:,...])
2970    integer, optional :: DIM
2971    logical, optional :: MASK([:...])
2972end function
2973
2974function IANY(ARRAY[, DIM] [, MASK])
2975    ! Reduces with bitwise OR (inclusive or) the elements of ARRAY along dimension DIM if the corresponding
2976    ! element in MASK is TRUE.
2977    ! Arguments:
2978    ! ARRAY   Shall be an array of type INTEGER
2979    ! DIM    (Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n, where n equals the rank of ARRAY.
2980    ! MASK   (Optional) shall be of type LOGICAL and either be a scalar or an array of the same shape as ARRAY.
2981    ! Return value:
2982    !    The result is of the same type as ARRAY.
2983    !    If DIM is absent, a scalar with the bitwise OR of all elements in ARRAY is returned.
2984    !    Otherwise, an array of rank n-1, where n equals the rank of ARRAY, and a shape similar to that
2985    !    of ARRAY with dimension DIM dropped is returned.
2986    ! Standard:
2987    !   Fortran 2008 and later
2988    integer :: ARRAY(:[,:,...])
2989    integer, optional :: DIM
2990    logical, optional :: MASK([:...])
2991end function
2992
2993function IPARITY(ARRAY[, DIM] [, MASK])
2994    ! Reduces with bitwise XOR (exclusive or) the elements of ARRAY along dimension DIM if the corresponding
2995    ! element in MASK is TRUE.
2996    ! Arguments:
2997    ! ARRAY   Shall be an array of type INTEGER
2998    ! DIM    (Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n, where n equals the rank of ARRAY.
2999    ! MASK   (Optional) shall be of type LOGICAL and either be a scalar or an array of the same shape as ARRAY.
3000    ! Return value:
3001    !    The result is of the same type as ARRAY.
3002    !    If DIM is absent, a scalar with the bitwise XOR of all elements in ARRAY is returned.
3003    !    Otherwise, an array of rank n-1, where n equals the rank of ARRAY, and a shape similar
3004    !    to that of ARRAY with dimension DIM dropped is returned.
3005    ! Standard:
3006    !   Fortran 2008 and later
3007    integer :: ARRAY(:[,:,...])
3008    integer, optional :: DIM
3009    logical, optional :: MASK([:...])
3010end function
3011
3012function STORAGE_SIZE(A [, KIND])
3013    ! Returns the storage size of argument A in bits.
3014    ! Arguments:
3015    ! A    Shall be a scalar or array of any type.
3016    ! KIND (Optional) shall be a scalar integer constant expression.
3017    ! Return value:
3018    !    The result is a scalar integer with the kind type parameter specified by KIND (or default integer type
3019    !    if KIND is missing). The result value is the size expressed in bits for an element of an array that
3020    !    has the dynamic type and type parameters of A.
3021    ! Standard:
3022    !   Fortran 2008 and later
3023    type(any_type) :: ARRAY(:[,:,...])
3024    integer, optional :: KIND
3025end function
3026
3027function PARITY(MASK[, DIM])
3028    ! Calculates the parity, i.e. the reduction using .XOR., of MASK along dimension DIM.
3029    ! Arguments:
3030    ! MASK   Shall be an array of type LOGICAL
3031    ! DIM   (Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n, where n equals the rank of MASK.
3032    ! Return value:
3033    !   The result is of the same type as MASK.
3034    !   If DIM is absent, a scalar with the parity of all elements in MASK is returned, i.e. true if
3035    !   an odd number of elements is .true. and false otherwise. If DIM is present, an array of rank n-1,
3036    !   where n equals the rank of ARRAY, and a shape similar to that of MASK with dimension DIM dropped is returned.
3037    ! Standard:
3038    !   Fortran 2008 and later
3039    logical :: MASK(:[,:,...])
3040    integer :: DIM
3041end function
3042
3043function NORM2(ARRAY[, DIM])
3044    ! Calculates the Euclidean vector norm (L_2 norm) of of ARRAY along dimension DIM.
3045    ! Arguments:
3046    ! ARRAY   Shall be an array of type REAL.
3047    ! DIM     (Optional) shall be a scalar of type INTEGER with a value in the range from 1 to n,
3048    !          where n equals the rank of ARRAY.
3049    ! Return value:
3050    !   The result is of the same type as ARRAY.
3051    !   If DIM is absent, a scalar with the square root of the sum of all elements in ARRAY squared is
3052    !   returned. Otherwise, an array of rank n-1, where n equals the rank of ARRAY, and a shape similar
3053    !   to that of ARRAY with dimension DIM dropped is returned.
3054    ! Standard:
3055    !   Fortran 2008 and later
3056    real :: ARRAY(:[,:,...])
3057    integer, optional :: DIM
3058end function
3059
3060subroutine EXECUTE_COMMAND_LINE(COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ])
3061    ! Runs a shell command, synchronously or asynchronously.
3062    ! If WAIT is present and has the value false, the execution of the command is asynchronous
3063    ! if the system supports it; otherwise, the command is executed synchronously.
3064    ! The three last arguments allow the user to get status information.
3065    ! After synchronous execution, EXITSTAT contains the integer exit code of the command, as returned by system.
3066    ! CMDSTAT is set to zero if the command line was executed (whatever its exit status was).
3067    ! CMDMSG is assigned an error message if an error has occurred.
3068    ! Standard:
3069    !    Fortran 2008 and later
3070    character(len=*), intent(in) :: COMMAND ! command line to be executed.
3071    logical, intent(in), optional :: WAIT ! Do perform execution synchronously?
3072    integer, intent(inout), optional :: EXITSTAT ! Exit status if synchronous execution is performed.
3073    integer, intent(out), optional :: CMDSTAT
3074    character(len=*), intent(inout), optional :: CMDMSG
3075end subroutine
3076
3077function FINDLOC (ARRAY, VALUE [, DIM, MASK, KIND, BACK])
3078    ! Returns location(s) of a specified value.
3079    ! Standard:
3080    !    Fortran 2008 and later
3081    type(intrinsic-type) :: ARRAY(..) ! Shall be an array of intrinsic type.
3082    type(same-as-array)  :: VALUE ! Shall be scalar in type conformance with ARRAY.
3083    integer, optional :: DIM  ! Shall be an integer scalar with a value in the range 1<=DIM<=n.
3084    logical, optional :: MASK ! (Optional) shall be of type logical and shall be conformance with ARRAY.
3085    integer, optional :: KIND ! (Optional) shall be a scalar integer constant.
3086    logical, optional :: BACK ! (Optional) shall be a logical scalar.
3087end function
3088
3089integer function NUM_IMAGES ([TEAM] [TEAM_NUMBER])
3090    ! Retuns the number of images.
3091    ! Return value:
3092    !    Scalar default-kind integer.
3093    ! Standard:
3094    !    Fortran 2008 and later
3095end function
3096
3097function THIS_IMAGE ([COARRAY] [, DIM][, TEAM])
3098    ! Returns the cosubscript for this image.
3099    ! Standard:
3100    !    Fortan 2008 and later.
3101    type(*), optional :: COARRAY
3102    integer, optional :: DIM  ! Shall be an integer scalar with a value in the range 1<=DIM<=n.
3103    type(team_type), optional :: TEAM
3104end function
3105
3106function UCOBOUND (COARRAY [, DIM, KIND])
3107    ! Returns the upper cobounds of a coarray, or a single upper cobound along the DIM codimension.
3108    ! Standard:
3109    !    Fortan 2008 and later.
3110    type(*), optional :: COARRAY
3111    integer, optional :: DIM
3112    integer, optional :: KIND
3113end function
3114
3115function LCOBOUND (COARRAY [, DIM, KIND])
3116    ! Returns the lower bounds of a coarray, or a single lower cobound along the DIM codimension.
3117    ! Standard:
3118    !    Fortan 2008 and later.
3119    type(*), optional :: COARRAY
3120    integer, optional :: DIM
3121    integer, optional :: KIND
3122end function
3123
3124integer function IMAGE_INDEX (COARRAY, SUB [, TEAM] [, TEAM_NUMBER])
3125    ! Returns the image index belonging to a cosubscript.
3126    ! Standard:
3127    !    Fortan 2008 and later.
3128    type(*) :: COARRAY
3129    integer :: SUB
3130    type(team_type), optional :: TEAM
3131    integer, optional :: TEAM_NUMBER
3132end function
3133
3134subroutine ATOMIC_DEFINE (ATOM, VALUE)
3135    ! Defines the variable ATOM with the value VALUE atomically.
3136    ! Standard:
3137    !    Fortan 2008 and later.
3138    ! Arguments:
3139    !  ATOM   Scalar coarray or coindexed variable of either integer type with ATOMIC_INT_KIND kind or logical type with ATOMIC_LOGICAL_KIND kind.
3140    !  VALUE  Scalar and of the same type as ATOM. If the kind is different, the value is converted to the kind of ATOM.
3141end subroutine
3142
3143subroutine ATOMIC_REF (ATOM, VALUE)
3144    ! Atomically assigns the value of the variable ATOM to VALUE.
3145    ! Standard:
3146    !    Fortan 2008 and later.
3147    ! Arguments:
3148    !  ATOM   Scalar coarray or coindexed variable of either integer type with ATOMIC_INT_KIND kind or logical type with ATOMIC_LOGICAL_KIND kind.
3149    !  VALUE  Scalar and of the same type as ATOM. If the kind is different, the value is converted to the kind of ATOM.
3150end subroutine
3151
3152subroutine ATOMIC_ADD(ATOM, VALUE [, STAT])
3153    ! Atomic addition.
3154    ! Arguments:
3155    !   ATOM  Scalar coarray or coindexed variable.
3156    !   VALUE Integer scalar.
3157    !   STAT (optional) Noncoindexed integer scalar.
3158    ! Standard:
3159    !   Fortran 2018 and later.
3160end subroutine
3161
3162subroutine ATOMIC_AND(ATOM, VALUE [, STAT])
3163    ! Atomic bitwise AND.
3164    ! Arguments:
3165    !   ATOM  Scalar coarray or coindexed variable.
3166    !   VALUE Integer scalar.
3167    !   STAT (optional) Noncoindexed integer scalar.
3168    ! Standard:
3169    !   Fortran 2018 and later.
3170end subroutine
3171
3172subroutine ATOMIC_CAS(ATOM, OLD, COMPARE, NEW [, STAT])
3173    ! Atomic compare and swap.
3174    ! Arguments:
3175    !   ATOM  Scalar coarray or coindexed variable.
3176    !   OLD   Scalar of the same type and kind as ATOM.
3177    !   COMPARE Scalar of the same type and kind as ATOM.
3178    !   NEW   Scalar of the same type and kind as ATOM.
3179    !   STAT (optional) Noncoindexed integer scalar.
3180    ! Standard:
3181    !   Fortran 2018 and later.
3182end subroutine
3183
3184subroutine ATOMIC_OR(ATOM, VALUE [, STAT])
3185    ! Atomic bitwise OR.
3186    ! Arguments:
3187    !   ATOM  Scalar coarray or coindexed variable.
3188    !   VALUE Integer scalar.
3189    !   STAT (optional) Noncoindexed integer scalar.
3190    ! Standard:
3191    !   Fortran 2018 and later.
3192end subroutine
3193
3194subroutine ATOMIC_XOR(ATOM, VALUE [, STAT])
3195    ! Atomic bitwise exclusive OR.
3196    ! Arguments:
3197    !   ATOM  Scalar coarray or coindexed variable.
3198    !   VALUE Integer scalar.
3199    !   STAT (optional) Noncoindexed integer scalar.
3200    ! Standard:
3201    !   Fortran 2018 and later.
3202end subroutine
3203
3204subroutine ATOMIC_FETCH_ADD(ATOM, VALUE, OLD, [, STAT])
3205    ! Atomic fetch and add.
3206    ! Arguments:
3207    !   ATOM  Scalar coarray or coindexed variable.
3208    !   VALUE Integer scalar.
3209    !   OLD  Scalar of the same type and kind as ATOM.
3210    !   STAT (optional) Noncoindexed integer scalar.
3211    ! Standard:
3212    !   Fortran 2018 and later.
3213end subroutine
3214
3215subroutine ATOMIC_FETCH_AND(ATOM, VALUE, OLD, [, STAT])
3216    ! Atomic fetch and bitwise AND.
3217    ! Arguments:
3218    !   ATOM  Scalar coarray or coindexed variable.
3219    !   VALUE Integer scalar.
3220    !   OLD  Scalar of the same type and kind as ATOM.
3221    !   STAT (optional) Noncoindexed integer scalar.
3222    ! Standard:
3223    !   Fortran 2018 and later.
3224end subroutine
3225
3226subroutine ATOMIC_FETCH_OR(ATOM, VALUE, OLD, [, STAT])
3227    ! Atomic fetch and bitwise OR.
3228    ! Arguments:
3229    !   ATOM  Scalar coarray or coindexed variable.
3230    !   VALUE Integer scalar.
3231    !   OLD  Scalar of the same type and kind as ATOM.
3232    !   STAT (optional) Noncoindexed integer scalar.
3233    ! Standard:
3234    !   Fortran 2018 and later.
3235end subroutine
3236
3237subroutine ATOMIC_FETCH_XOR(ATOM, VALUE, OLD, [, STAT])
3238    ! Atomic fetch and bitwise exclusive OR.
3239    ! Arguments:
3240    !   ATOM  Scalar coarray or coindexed variable.
3241    !   VALUE Integer scalar.
3242    !   OLD  Scalar of the same type and kind as ATOM.
3243    !   STAT (optional) Noncoindexed integer scalar.
3244    ! Standard:
3245    !   Fortran 2018 and later.
3246end subroutine
3247
3248subroutine CO_BROADCAST(A, SOURCE_IMAGE [, STAT, ERRMSG])
3249    ! Braodcast value to images.
3250    ! Arguments:
3251    !   A  Becomes defined with the same values on all images in the current team.
3252    !   SOURCE_IMAGE Integer scalar with value the same in all team.
3253    !   STAT (optional) Noncoindexed integer scalar.
3254    !   ERRMSG  Default character scalar.
3255    ! Standard:
3256    !   Fortran 2018 and later.
3257end subroutine
3258
3259subroutine CO_MAX(A [, RESULT_IMAGE, STAT, ERRMSG])
3260    ! Compute maximum value across images.
3261    ! Arguments:
3262    !   A  Integer, real or character variable.
3263    !   RESULT_IMAGE (optional) Integer scalar with value the same in all team.
3264    !   STAT (optional) Noncoindexed integer scalar.
3265    !   ERRMSG  Default character scalar.
3266    ! Standard:
3267    !   Fortran 2018 and later.
3268end subroutine
3269
3270subroutine CO_MIN(A [, RESULT_IMAGE, STAT, ERRMSG])
3271    ! Compute minimum value across images.
3272    ! Arguments:
3273    !   A  Integer, real or character variable.
3274    !   RESULT_IMAGE (optional) Integer scalar with value the same in all team.
3275    !   STAT (optional) Noncoindexed integer scalar.
3276    !   ERRMSG  Default character scalar.
3277    ! Standard:
3278    !   Fortran 2018 and later.
3279end subroutine
3280
3281subroutine CO_REDUCE(A, OPERATION [, RESULT_IMAGE, STAT, ERRMSG])
3282    ! Reduction across images.
3283    ! Arguments:
3284    !   A  Non polimorphic scalar or array variable.
3285    !   OPERATION  Pure function with two arguments.
3286    !   RESULT_IMAGE (optional) Integer scalar with value the same in all team.
3287    !   STAT (optional) Noncoindexed integer scalar.
3288    !   ERRMSG  Default character scalar.
3289    ! Standard:
3290    !   Fortran 2018 and later.
3291end subroutine
3292
3293subroutine CO_SUM(A [, RESULT_IMAGE, STAT, ERRMSG])
3294    ! Compute sum across images.
3295    ! Arguments:
3296    !   A  Integer, real or character variable.
3297    !   RESULT_IMAGE (optional) Integer scalar with value the same in all team.
3298    !   STAT (optional) Noncoindexed integer scalar.
3299    !   ERRMSG (optional) Default character scalar.
3300    ! Standard:
3301    !   Fortran 2018 and later.
3302end subroutine
3303
3304subroutine EVENT_QUERY(EVENT, COUNT [, STAT])
3305    ! Query event count.
3306    ! Arguments:
3307    !   EVENT (intent(in)) An event variable.
3308    !   COUNT (intent(out)) Integer scalar
3309    !   STAT (optional) Noncoindexed integer scalar.
3310    ! Standard:
3311    !   Fortran 2018 and later.
3312end subroutine
3313
3314function FAILED_IMAGES([TEAM, KIND])
3315    ! Returns indices of failed images in an array of rank one.
3316    ! Arguments:
3317    !   TEAM (optional) Scalar of type TEAM_TYPE with value of the current or an ancestor team.
3318    !   KIND (optional) Integer scalar.
3319    ! Standard:
3320    !   Fortran 2018 and later.
3321end function
3322
3323function IMAGE_STATUS(IMAGE [, TEAM])
3324    ! Returns image execution state.
3325    ! Arguments:
3326    !   IMAGE Integer with an image index.
3327    !   TEAM (optional) Scalar of type TEAM_TYPE with value of the current or an ancestor team.
3328    ! Standard:
3329    !   Fortran 2018 and later.
3330end function
3331
3332function STOPPED_IMAGES([TEAM, KIND])
3333    ! Returns indices of stopped images in an array of rank one.
3334    ! Arguments:
3335    !   TEAM (optional) Scalar of type TEAM_TYPE with value of the current or an ancestor team.
3336    !   KIND (optional) Integer scalar.
3337    ! Standard:
3338    !   Fortran 2018 and later.
3339end function
3340
3341function TEAM_NUMBER([TEAM])
3342    ! Returns default integer with value that identifies the specified team within its parent team.
3343    ! Arguments:
3344    !   TEAM (optional) Scalar of type TEAM_TYPE with value of the current or an ancestor team.
3345    ! Standard:
3346    !   Fortran 2018 and later.
3347end function
3348
3349function GET_TEAM([LEVEL])
3350    ! Returns scalar of type TEAM_TYPE with value that identifies the team.
3351    ! Arguments:
3352    !   LEVEL (optional) Scalar integer with value INITIAL_TEAM, PARENT_TEAM, or CURRENT_TEAM.
3353    ! Standard:
3354    !   Fortran 2018 and later.
3355end function
3356
3357integer function COSHAPE(COARRAY[, KIND])
3358    ! Return sizes of codimensions of a coarray.
3359    ! Arguments:
3360    !   COARRAY shall be coarray of any type.
3361    !   KIND (optional) shall be a scalar integer constant expression.
3362    ! Return value:
3363    !   The result has a value whose i_th element is equal to the size of the i_th codimension of COARRAY,
3364    !   as given by UCOBOUND (COARRAY, i) − LCOBOUND (COARRAY, i) +1.
3365end function
3366
3367function RANK(A)
3368    ! Determine the rank of a data object.
3369    integer :: RANK
3370    type(any_type) :: A ! data object
3371end function
3372
3373logical function OUT_OF_RANGE(X, MOLD [, ROUND])
3374    ! Returns .true. if X value cannot be converterd safely.
3375    integer or real :: X
3376    integer or real :: MOLD
3377    logical, optional :: ROUND
3378end function
3379
3380function REDUCE(ARRAY, OPERATION[, DIM][, MASK, IDENTITY, ORDERED])
3381    ! General reduction of array.
3382    type(any_type), dimension(..) :: ARRAY
3383    interface
3384        pure function OPERATION(A, B)
3385        end function
3386    end interface
3387    integer, optional :: DIM
3388    logical, (conformable with ARRAY), optional :: MASK
3389    type(same as ARRAY, scalar), optional :: IDENTITY
3390    logical, optional :: ORDERED
3391end function
3392
3393logical function IS_CONTIGUOUS(ARRAY)
3394    ! Array contiguity test.
3395    ! Returns .true. if ARRAY has rank zero or is contiguous, and .false. otherwise.
3396    type(any_type), dimension(..) :: ARRAY
3397end function
3398
3399subroutine __fortran_statement_OPEN(UNIT, NEWUNIT, FILE, ACCESS, ACTION, ASYNCHRONOUS, BLANK, DECIMAL, DELIM, &
3400                    ENCODING, ERR, FORM, IOSTAT, PAD, POSITION, RECL, ROUND, SIGN, STATUS)
3401    ! Connect or reconnect an external file to an input/output unit.
3402
3403    integer, intent(in) :: UNIT            ! External file unit number.
3404    integer, intent(out) :: NEWUNIT        ! Automatially chosen unit number.
3405    character(len=*), intent(in) :: FILE   ! The name of the file to be connected.
3406    character(len=*), intent(in) :: ACCESS ! Access mode one from 'SEQUENTIAL' (default), 'DIRECT' or 'STREAM'
3407    character(len=*), intent(in) :: ACTION ! File access: 'READWRITE' (default), 'READ' or 'WRITE'
3408    character(len=*), intent(in) :: ASYNCHRONOUS ! 'YES' allows asynchronous i/o on the unit, 'NO' does not allow.
3409    character(len=*), intent(in) :: BLANK   ! Controls how interpreted blanks. Values: 'NULL' (default) or 'ZERO'.
3410    character(len=*), intent(in) :: DECIMAL ! Specifies the default decimal edit mode: 'POINT' (default) or 'COMMA'.
3411    character(len=*), intent(in) :: DELIM   ! Specifies delimiter for character constants in namelist: 'APOSTROPHE', 'QUOTE' or 'NONE'.
3412    character(len=*), intent(in) :: ENCODING ! Shall be: 'DEFAULT' or 'UTF-8'.
3413    integer, intent(in)          :: ERR      ! Statement label to go if error occurs.
3414    character(len=*), intent(in) :: FORM     ! Shall be: 'DEFAULT' or 'UTF-8'.
3415    integer, intent(out) :: IOSTAT     ! Returns: a zero value if no error, a positive value if an error.
3416    character(len=*), intent(in) :: PAD      ! Specifies if input records are padded with blanks: 'YES' (default) or 'NO'.
3417    character(len=*), intent(in) :: POSITION ! Specifies the file position for a file connected: 'ASIS', 'REWIND', 'APPEND'.
3418    integer, intent(in) :: RECL  ! Specifies specifies the length of record.
3419    character(len=*), intent(in) :: ROUND ! Rounding mode to be used: 'UP', 'DOWN', 'ZERO', 'NEAREST', 'COMPATIBLE' or 'PROCESSOR_DEFINED' (default).
3420    character(len=*), intent(in) :: SIGN ! Specifies the sign mode in effect: 'PLUS', 'SUPPRESS' or 'PROCESSOR_DEFINED' (default).
3421    character(len=*), intent(in) :: STATUS ! Specifies the status of the file when it is opened: 'OLD', 'NEW', 'SCRATCH', 'REPLACE', or 'UNKNOWN'.
3422end subroutine
3423
3424module OpenMP
3425    type(keywords) ::  atomic, auto, barrier, capture, collapse, copyin, copyprivate, default, end, &
3426                       firstprivate, lastprivate, private, reduction, schedule, shared, critical, &
3427                       do, flush, master, ordered, parallel, sections, workshare, copyin, copyprivate, &
3428                       threadprivate, dynamic, guided, read, runtime, single, update, write, &
3429                       static, task, if, final, untied, none, mergeable, taskwait, taskyield, &
3430                       num_threads, section, nowait, &
3431                       endatomic, endcritical, enddo, endmaster, endordered, endparallel, endsections, &
3432                       endsingle, endtask, endworkshare, paralleldo, parallelsections, parallelworkshare, &
3433
3434                       proc_bind, close, spread, simd, safelen, linear, aligned, declare, simdlen, lenear, &
3435                       uniform, inbranch, notingranch, target, device, map, to, from, teams, num_teams, &
3436                       thread_limit, distribute, dist_schedule, depend, in, out, inout, taskgroup, &
3437                       seq_cst, max, min, iand, ior, ieor, cancel, cancellation, point, omp_priv, &
3438
3439                       monotonic, nonmonotonic, priority, taskloop, enter, data, exit, map, use_device_ptr, threads, source, sink
3440
3441end module
3442
3443module OpenACC
3444    type(keywords) :: parallel, end, if, async, num_gangs, num_workers, vector_length, reduction, &
3445                      copy, copyin, copyout, create, present, present_or_copy, present_or_copyin, &
3446                      present_or_copyout, present_or_create, deviceptr, private, firstprivate, &
3447                      kernels, data, host_data, use_device, &
3448                      loop, collapse, gang, worker, vector, seq, independent, cache, &
3449                      declare, device_resident, update, host, device, wait
3450
3451end module
3452
3453