| United States-English |
|
|
|
![]() |
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 11 Intrinsic
proceduresIntrinsic procedure specifications |
|
The following sections describe the HP Fortran intrinsic procedures. The descriptions are ordered alphabetically, by intrinsic name. All of the intrinsics are generic. This means that the type, kind, and rank of the actual arguments can differ for each reference to the same intrinsic. In many cases, the kind and type of intrinsic function results are the same as that of the principal argument. For example, the SIN function may be called with any kind of real argument or any kind of complex argument, and the result has the type and kind of the argument. Intrinsic procedure references may use keyword option. The actual argument expression is preceded by the dummy argument name—the argument keyword—and the equals sign (=). The argument keywords are shown in the descriptions. Some intrinsic procedure’s arguments are optional. Optional arguments are noted as such in the following descriptions. Description Close all files, terminate the program, and cause an exception to create a core file. Class DescriptionClassArgumentA must be of type integer, real, or complex. Result type/ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data type of ARRAY | Default value of BOUNDARY |
|---|---|
Integer | 0 |
Real | 0.0 |
Complex | (0.0, 0.0) |
Logical | .FALSE. |
Character (len) | len blanks |
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. If DIM is omitted, it is as if it were present with the value 1.
The result has the type, type parameters, and shape of ARRAY.
Element (s1, s1, ..., sn) of the result has the value ARRAY (s1, s2, ..., sDIM-1, sDIM + sh, sDIM+1, ..., sn) where sh is SHIFT or SHIFT(s1, s2, ..., sDIM-1, sDIM+1, ..., sn) provided the inequality LBOUND(ARRAY, DIM) <= sDIM + sh <= UBOUND(ARRAY, DIM) holds and is otherwise BOUNDARY or BOUNDARY(s1, s2, ..., sDIM-1, sDIM+1, ..., sn).
KEOSHIFT.
Returns a positive model number that is almost negligible compared to unity in the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type real. It may be scalar or array valued.
Scalar of the same type and kind type parameter as X.
The result has the value b1-p where b and p are as defined in “The Real Number System Model” for the model representing numbers of the same type and kind type parameter as X.
Close all files and terminate the program.
Nonstandard subroutine.
STATUS must be of type integer.
If STATUS is supplied, the calling program exits with a return code status of STATUS. Otherwise the return code status is indeterminate.
In csh the $status environment variable holds the return code for the last executed command. In ksh, the $? environment variable holds the return code.
Elemental function.
X must be of type real or complex.
Same as X.
The result has a value equal to a processor-dependent approximation to ex. If X is of type complex, its imaginary part is regarded as a value in radians.
Returns the exponent part of the argument when represented as a model number.
Elemental function.
Default integer.
The result has a value equal to the exponent e of the model representation (see “The Real Number System Model”) for the value of X, provided X is nonzero and e is within the range for default integers. The result is undefined if the processor cannot represent e in the default integer type. EXPONENT(X) has the value zero if X is zero.
Returns the greatest integer less than or equal to its argument.
Elemental function.
A must be of type real.
Default integer.
The result has a value equal to the greatest integer less than or equal to A. The result is undefined if the processor cannot represent this value in the default integer type.
Returns the fractional part of the model representation of the argument value.
Elemental function.
X must be of type real.
Same as X.
The result has the value X * b-e, where b and e are as defined in “The Real Number System Model”. If X has the value zero, the result has the value zero.
Get the arguments passed to the program.
Nonstandard subroutine.
must be of type integer. N specifies which command-line argument is requested. When N=1, it returns the program name. When N=0, it returns all blanks.
must be a character variable. It is assigned the requested command-line argument, padded with blanks on the end. If the requested argument is longer than STRING, a truncated version is assigned to STRING.
Return the value of a system environment variable.
Nonstandard subroutine.
VAR and VALUE are of type character. VAR specifies the environment variable name. The character variable VALUE is assigned the environment variable’s value. VALUE must be declared large enough to hold the value. If the environment variable is not defined VALUE is set to all blanks.
Generate Gaussian normal random numbers.
Elemental nonstandard function.
REAL(4). The numbers generated by GRAN have a mean of 0.0, a standard deviation of 1.0, and a range of approximately -5.0 through +5.0.
Elemental nonstandard function.
A must be of type integer, real, double precision, or complex.
INTEGER(2) type.
Returns the largest number in the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type integer or real. It may be scalar or array valued.
Scalar of the same type and kind type parameter as X.
The result has the value rq - 1 if X is of type integer and
(1 - b-p) b ** emax
if X is of type real, where r, q, b, p, and emax are as defined in “The Real Number System Model”.
Returns the position of a character in the ASCII collating sequence.
Elemental function.
C must be of type default character and of length one.
Default integer.
If C is in the collating sequence defined by the codes specified in ISO 646:1983 (“Information technology — ISO 7-bit coded character set for information interchange”), the result is the position of C in that sequence and satisfies the inequality (0 <= IACHAR(C) <= 127).
A processor-dependent value is returned if C is not in the ASCII collating sequence. The results are consistent with the LGE, LGT, LLE, and LLT lexical comparison functions. For example, if LLE(C, D) is .TRUE., IACHAR(C) .LE. IACHAR(D) is .TRUE. where C and D are any two characters representable by the processor.
Inquiry nonstandard function.
X may be of any type.
The result is of type default integer.
See “BADDRESS(X)” for examples.
Performs a bitwise logical AND.
Elemental function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by combining I and J bit-by-bit according to Table 11-6 “Truth table for IAND intrinsic”.
The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
BIAND, HIAND, IIAND, JIAND, KIAND.
Get the number of arguments passed to the program.
Elemental nonstandard function.
Integer.
If no arguments are passed to the program, IARGC returns zero. Otherwise IARGC returns a count of the arguments that follow the program name on the command line.
Elemental function.
must be of type integer.
must be of type integer. It must be nonnegative and less than BIT_SIZE(I).
Same as I.
The result has the value of the sequence of bits of I, except that bit POS of I is set to zero. The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
BBCLR, HBCLR, IIBCLR, JIBCLR, KIBCLR.
Elemental function.
must be of type integer.
must be of type integer. It must be nonnegative and POS + LEN must be less than or equal to BIT_SIZE(I).
must be of type integer and nonnegative.
Same as I.
The result has the value of the sequence of LEN bits in I beginning at bit POS, right-adjusted and with all other bits zero. The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
BBITS, HBITS, IIBITS, JIBITS, KIBITS.
Elemental function.
must be of type integer.
must be of type integer. It must be nonnegative and less than BIT_SIZE(I).
Same as I.
The result has the value of the sequence of bits of I, except that bit POS of I is set to one. The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
HBSET, IIBSET,JIBSET,KIBSET.
Returns the position of a character in the processor collating sequence associated with the kind type parameter of the character.
Elemental function.
C must be of type character and of length one. Its value must be that of a character capable of representation in the processor.
Default integer.
The result is the position of C in the processor collating sequence associated with the kind type parameter of C and is in the range 0 <= IACHAR(C) <n-1, where n is the number of characters in the collating sequence.
For any characters C and D capable of representation in the processor, C.LE.D is .TRUE. if and only if ICHAR(C) .LE. ICHAR(D) is .TRUE., and C.EQ.D is .TRUE. if and only if ICHAR(C).EQ. ICHAR(D) is .TRUE..
Return the month, day, and year of current system.
Nonstandard subroutine.
MONTH, DAY, and YEAR must be of type integer.
Nonstandard function.
must be of type integer.
must be of type integer with the same kind type parameter as X.
Integer of same kind type parameter as X.
If X > Y, IDIM(X, Y) is X-Y. If X <= Y, IDIM(X, Y) is zero.
IIDIM,JIDIM. KIDIM.
Performs a bitwise exclusive OR.
Elemental function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by combining I and J bit-by-bit according to Table 11-7 “Truth table for IEOR intrinsic”.
The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
BIEOR, HIEOR, IIEOR, JIEOR, KIEOR.
Inquiry nonstandard function.
must be of type integer. N specifies which command-line argument is requested. When N=0, it returns the program name.
must be a character variable. It is assigned first STRLEN characters of the requested command-line argument, padded with blanks on the end. If the requested argument is longer than STR, a truncated version is assigned to STR.
must be of type integer. STRLEN specifies the number of characters of argument N to assign to STR.
IGETARG returns an integer value, either -1 if the requested argument was not found, or a positive integer that indicates the number of characters copied from the command line to STR.
Elemental nonstandard function.
A must be of type INTEGER(4).
INTEGER(2) type.
Imaginary part of complex number.
Elemental nonstandard function.
A must be of type complex or double complex.
Real if A is complex. Double precision if A is double complex.
Returns the starting position of a substring within a string.
Elemental function.
must be of type character.
must be of type character with the same kind type parameter as STRING.
must be of type logical.
Default integer.
If BACK is absent or present with the value .FALSE., the result is the minimum positive value of I such that STRING(I : I + LEN(SUBSTRING) - 1) = SUBSTRING or zero if there is no such value.
Zero is returned if LEN(STRING) < LEN(SUBSTRING) and one is returned if LEN(SUBSTRING) = 0.
If BACK is present with the value .TRUE., the result is the maximum value of I less than or equal to LEN(STRING) - LEN(SUBSTRING) + 1 such that STRING(I : I + LEN(SUBSTRING) - 1) = SUBSTRING or zero if there is no such value.
Zero is returned if LEN(STRING) < LEN(SUBSTRING) and LEN(STRING) + 1 is returned if LEN(SUBSTRING) = 0.
KINDEX.
Convert to integer type.
Elemental function.
must be of type integer, real, or complex.
must be a scalar integer initialization expression.
Integer. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default integer type.
If A is of type integer, INT(A) = A.
If A is of type real, there are two cases: if |A| < 1, INT(A) has the value 0; if |A| >= 1, INT(A) is the integer whose magnitude is the largest integer that does not exceed the magnitude of A and whose sign is the same as the sign of A.
If A is of type complex, INT(A) is the value obtained by applying the above rules (for reals) to the real part of A. The result is undefined if the processor cannot represent the result in the specified integer type.
Elemental nonstandard function.
A must be of type integer, real, or complex.
INTEGER(1) type. If A is complex, INT1(A) is equal to the truncated real portion of A.
Elemental nonstandard function.
A must be of type integer, real, or complex.
INTEGER(2) type. If A is complex, INT2(A) is equal to the truncated real portion of A.
Elemental nonstandard function.
A must be of type integer, real, or complex.
INTEGER(4) type. If A is complex, INT4(A) is equal to the truncated real portion of A.
Elemental nonstandard function.
A must be of type integer, real, or complex.
INTEGER(8) type. If A is complex, INT8(A) is equal to the truncated real portion of A.
Convert character to INTEGER(2) type.
Elemental nonstandard function.
I must be of type character.
INTEGER(2) type.
Performs a bitwise inclusive OR.
Elemental function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by combining I and J bit-by-bit according to Table 11-8 “Truth table for IOR intrinsic”.
The model for the interpretation of an integer value as a sequence of bits is in “The Bit Model”.
BIOR, HIOR, IIOR, JIOR, KIOR
Elemental nonstandard function.
A must be of type REAL(16).
Integer type.
IIQINT, JIQINT,KIQINT.
Generate pseudorandom numbers.
Elemental nonstandard function.
INTEGER(4) type.
RAND generates numbers in the range 0 through 215-1.
| NOTE: For details about restarting the pseudorandom number generator used by IRAND and RAND, see “SRAND(ISEED)”. | |
Generate Poisson-distributed random numbers.
Elemental nonstandard function.
X must be of REAL(4) type and must be in the range 0.0 through 87.33. For better performance, it is recommended that X be less than 50.0 (see “Result value” below).
INTEGER(4) type.
IRANP returns an error code of -1 if X <= 0.0.
IRANP returns an error code of -2 if X > 87.33.
IRANP calculates exponentially distributed random numbers until the product is less than exp(-X). The random number returned by IRANP is the number of exponentials needed, minus 1. IRANP makes an average of X+1 calls to RAND, so it is recommended that X be less than 50.
Elemental function.
must be of type integer.
must be of type integer. The absolute value of SHIFT must be less than or equal to BIT_SIZE(I).
Same as I.
The result has the value obtained by shifting the bits of I by SHIFT positions.
If SHIFT is positive, the shift is to the left; if SHIFT is negative, the shift is to the right; and if SHIFT is zero, no shift is performed. Bits shifted out from the left or from the right, as appropriate, are lost. Zeros are shifted in from the opposite end.
The model for the interpretation of an integer value as a sequence of bits is described in “The Bit Model”.
BSHFT, HSHFT, IISHFT, JISHFT, KISHFT.
Performs a circular shift of the rightmost bits.
Elemental function.
must be of type integer.
must be of type integer. The absolute value of SHIFT must be less than or equal to SIZE.
must be of type integer. The value of SIZE must be positive and must not exceed BIT_SIZE(I). If SIZE is absent, it is as if it were present with the value of BIT_SIZE(I).
Same as I.
The result has the value obtained by shifting the SIZE rightmost bits of I circularly by SHIFT positions.
If SHIFT is positive, the shift is to the left; if SHIFT is negative, the shift is to the right; and if SHIFT is zero, no shift is performed. No bits are lost. The unshifted bits are unaltered.
The model for the interpretation of an integer value as a sequence of bits is described in “The Bit Model”.
HSHFTC,ISHFTC, JISHFTC, KISHFTC.
Absolute value of A times the sign of B.
Elemental nonstandard function.
must be of type integer.
must be of type integer with the same kind type parameter as A.
Same as A.
The value of the result is |A| if B>= 0 and -|A| if B < 0.
Determine if a value is NaN (not a number).
Elemental nonstandard function.
X must be of type real.
Logical.
Elemental nonstandard function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by performing an exclusive OR on I and J bit-by-bit according to Table 11-9 “Truth table for IXOR intrinsic”.
The model for interpreting an integer value as a sequence of bits is described in “The Bit Model”.
BIXOR, HIXOR, IIXOR, JIXOR.
Generic elemental nonstandard function.
must be of type INTEGER(1), INTEGER(2), LOGICAL(1), or LOGICAL(2).
The result is of type INTEGER(2).
IZEXT converts A to INTEGER(2) by sign-extending zeroes instead of the actual sign bit.
Convert character to integer type.
Elemental nonstandard function.
I must be of type character.
Integer type.
Generic elemental nonstandard function.
must be of type INTEGER(1), INTEGER(2), INTEGER(4), LOGICAL(1), LOGICAL(2), or LOGICAL(4).
The result is of type INTEGER(4).
JZEXT converts A to INTEGER(4) by sign-extending zeroes instead of the actual sign bit.
Returns the value of the kind type parameter of X.
Inquiry function.
X may be of any intrinsic type.
Default integer scalar.
The result has a value equal to the kind type parameter value of X.
Generic elemental nonstandard function.
must be of type INTEGER(1), INTEGER(2), INTEGER(4), INTEGER(8), LOGICAL(1), LOGICAL(2), LOGICAL(4), or LOGICAL(8).
The result is of type INTEGER(8).
KZEXT converts A to INTEGER(8) by sign-extending zeroes instead of the actual sign bit.
Returns all the lower bounds or a specified lower bound of an array.
Inquiry function.
may be of any type. It must not be scalar. It must not be a pointer that is disassociated or an allocatable array that is not allocated.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
The result is of type default integer. It is scalar if DIM is present; otherwise, the result is an array of rank one and size n, where n is the rank of ARRAY.
For an array section or for an array expression other than a whole array or array structure component, LBOUND(ARRAY, DIM) has the value 1. For a whole array or array structure component, LBOUND(ARRAY, DIM) has the value:
equal to the lower bound for subscript DIM of ARRAY if dimension DIM of ARRAY does not have extent zero or if ARRAY is an assumed-size array of rank DIM
or
one (1), otherwise.
LBOUND(ARRAY) has a value whose ith component is equal to LBOUND(ARRAY, i), for i= 1, 2, ..., n, where n is the rank of ARRAY.
KLBOUND.
Returns the length of a character entity.
Inquiry function.
STRING must be of type character. It may be scalar or array valued.
Default integer scalar.
The result has a value equal to the number of characters in STRING if it is scalar or in an element of STRING if it is array valued.
KLEN.
Returns the length of the character argument without counting trailing blank characters.
Elemental function.
STRING must be of type character.
Default integer.
The result has a value equal to the number of characters remaining after any trailing blanks in STRING are removed. If the argument contains no nonblank characters, the result is zero.
KLEN_TRIM.
Tests whether a string is lexically greater than or equal to another string, based on the ASCII collating sequence.
Elemental function.
must be of type default character.
must be of type default character.
Default logical.
If the strings are of unequal length, the comparison is made as if the shorter string were extended on the right with blanks to the length of the longer string.
If either string contains a character not in the ASCII character set, the result is processor dependent.
The result is .TRUE. if the strings are equal or if STRING_A follows STRING_B in the ASCII collating sequence; otherwise, the result is .FALSE. Note that the result is .TRUE. if both STRING_A and STRING_B are of zero length.
Tests whether a string is lexically greater than another string, based on the ASCII collating sequence.
Elemental function.
must be of type default character.
must be of type default character.
Default logical.
If the strings are of unequal length, the comparison is made as if the shorter string were extended on the right with blanks to the length of the longer string.
If either string contains a character not in the ASCII character set, the result is processor-dependent.
The result is .TRUE. if STRING_A follows STRING_B in the ASCII collating sequence; otherwise, the result is .FALSE.. Note that the result is .FALSE. if both STRING_A and STRING_B are of zero length.
Tests whether a string is lexically less than or equal to another string, based on the ASCII collating sequence.
Elemental function.
must be of type default character.
must be of type default character.
Default logical.
If the strings are of unequal length, the comparison is made as if the shorter string were extended on the right with blanks to the length of the longer string.
If either string contains a character not in the ASCII character set, the result is processor dependent.
The result is .TRUE. if the strings are equal or if STRING_A precedes STRING_B in the ASCII collating sequence; otherwise, the result is .FALSE.. Note that the result is .TRUE. if both STRING_A and STRING_B are of zero length.
Tests whether a string is lexically less than another string, based on the ASCII collating sequence.
Elemental function.
must be of type default character.
must be of type default character.
Default logical.
If the strings are of unequal length, the comparison is made as if the shorter string were extended on the right with blanks to the length of the longer string.
If either string contains a character not in the ASCII character set, the result is processor-dependent.
The result is .TRUE. if STRING_A precedes STRING_B in the ASCII collating sequence; otherwise, the result is .FALSE.. Note that the result is .FALSE. if both STRING_A and STRING_B are of zero length.
Elemental function.
X must be of type real or complex. If X is real, its value must be greater than zero. If X is complex, its value must not be zero.
Same as X.
The result has a value equal to a processor-dependent approximation to logex. A result of type complex is the principal value with imaginary part w in the range -Pi < w <= Pi. The imaginary part of the result is Pi only when the real part of the argument is less than zero and the imaginary part of the argument is zero.
ALOG, CDLOG, CLOG, DLOG, QLOG, ZLOG.
Elemental function.
X must be of type real. The value of X must be greater than zero.
Same as X.
The result has a value equal to a processor-dependent approximation to log10X.
ALOG10, DLOG10, QLOG10.
Converts between kinds of logical.
Elemental function.
must be of type logical.
must be a scalar integer initialization expression.
Logical. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default logical.
The value is that of L.
Performs matrix multiplication of numeric or logical matrices.
Transformational function.
must be of numeric type (integer, real, or complex) or of logical type. It must be array valued and of rank one or two.
must be of numeric type if MATRIX_A is of numeric type and of logical type if MATRIX_A is of logical type. It must be array valued and of rank one or two.
If MATRIX_A has rank one, MATRIX_B must have rank two. If MATRIX_B has rank one, MATRIX_A must have rank two. The size of the first (or only) dimension of MATRIX_B must equal the size of the last (or only) dimension of MATRIX_A.
If the arguments are of numeric type, the type and kind type parameter of the result are determined by the types of MATRIX_A and MATRIX_B.
If the arguments are of type logical, the result is of type logical with the kind type parameter of the arguments.
The shape of the result depends on the shapes of the arguments as follows:
If MATRIX_A has shape [n, m] and MATRIX_B has shape [m, k], the result has shape [n, k].
If MATRIX_A has shape [m] and MATRIX_B has shape [m, k], the result has shape [k].
If MATRIX_A has shape [n, m] and MATRIX_B has shape [m], the result has shape [n].
Element (i, j) of the result has the value SUM(MATRIX_A(i,:) * MATRIX_B(:, j)) if the arguments are of numeric type and has the value ANY(MATRIX_A(i, :) .AND. MATRIX_B(:, j)) if the arguments are of logical type.
Element (j) of the result has the value SUM(MATRIX_A(:) * MATRIX_B(:, j)) if the arguments are of numeric type and has the value ANY(MATRIX_A(:) .AND. MATRIX_B(:, j)) if the arguments are of logical type.
Element (i) of the result has the value SUM(MATRIX_A(i, :) * MATRIX_B(:)) if the arguments are of numeric type and has the value ANY(MATRIX_A(i, :) .AND. MATRIX_B(:)) if the arguments are of logical type.
Maximum value.
Elemental function.
The arguments must all have the same type which must be integer or real, and they must all have the same kind type parameter.
Same as the arguments.
The value of the result is that of the largest argument.
AIMAX0,AJMAX0, AKMAX0, AMAX0, AMAX1, DMAX1, IMAX0, IMAX1, JMAX0, JMAX1, KMAX0, KMAX1, MAX0, MAX1, QMAX1.
Returns the maximum exponent in the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type real. It may be scalar or array valued.
Default integer scalar.
The result has the value emax, as defined in “The Real Number System Model”.
KMAXLOC.
Returns the location of the first element of ARRAY having the maximum value of the elements identified by MASK.
Transformational function.
must be of type integer or real. It must not be scalar.
must be of type logical and must be conformable with ARRAY.
The result is of type default integer; it is an array of rank one and of size equal to the rank of ARRAY.
If MASK is absent, the result is a rank-one array whose element values are the values of the subscripts of an element of ARRAY whose value equals the maximum value of all of the elements of ARRAY.
The ith subscript returned lies in the range 1 to ei, where ei is the extent of the ith dimension of ARRAY.
If more than one element has the maximum value, the element whose subscripts are returned is the first such element, taken in array element order. If ARRAY has size zero, the value of the result is processor-dependent.
If MASK is present, the result is a rank-one array whose element values are the values of the subscripts of an element of ARRAY, corresponding to a .TRUE. element of MASK, whose value equals the maximum value of all such elements of ARRAY.
The ith subscript returned lies in the range 1 to ei, where ei is the extent of the ith dimension of ARRAY.
If more than one such element has the maximum value, the element whose subscripts are returned is the first such element taken in array element order.
If there are no such elements (that is, if ARRAY has size zero or every element of MASK has the value .FALSE.), the value of the result is processor-dependent.
In both cases, an element of the result is undefined if the processor cannot represent the value as a default integer.
Maximum value of the elements of ARRAY along dimension DIM that correspond to the .TRUE. elements of MASK.
Transformational function.
must be of type integer or real. It must not be scalar.
must be scalar and of type integer with a value in the range 1 <= DIM <= n where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
must be of type logical and must be conformable with ARRAY.
The result is of the same type and kind type parameter as ARRAY.
It is scalar if DIM is absent or ARRAY has rank one; otherwise, the result is an array of rank n-1 and of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn) where (d1, d2, ..., dn) is the shape of ARRAY.
The result of MAXVAL(ARRAY) has a value equal to the maximum value of all the elements of ARRAY or has the value of the negative number of the largest magnitude supported by the processor for numbers of the type and kind type parameter of ARRAY if ARRAY has size zero.
The result of MAXVAL(ARRAY, MASK = MASK) has a value equal to the maximum value of the elements of ARRAY corresponding to .TRUE. elements of MASK or has the value of the negative number of the largest magnitude supported by the processor for numbers of the same type and kind type parameter as ARRAY if there are no .TRUE. elements.
If ARRAY has rank one, MAXVAL(ARRAY, DIM [,MASK]) has a value equal to that of MAXVAL(ARRAY [,MASK = MASK]). Otherwise, the value of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of MAXVAL(ARRAY, DIM [,MASK]) is equal to the following:
MAXVAL(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) [, MASK = MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) ] )
Return time accounting for a program.
Inquiry nonstandard function.
Integer.
The value returned, in units of microseconds, is the sum of the current process’s user time and the user and system time of all its child processes.
Choose alternative value according to the value of a mask.
Elemental function.
may be of any type.
must be of the same type and type parameters as TSOURCE.
must be of type logical.
The result is TSOURCE if MASK is .TRUE. and FSOURCE otherwise.
Minimum value.
Elemental function.
The arguments must all be of the same type, which must be integer or real, and they must all have the same kind type parameter.
Same as the arguments.
The value of the result is that of the smallest argument.
AIMIN0, AJMIN0, AKMIN0, AMIN0, AMIN1, DMIN1, IMIN0, IMIN1, JMIN0, JMIN1, KMIN0, KMIN1, MIN0, MIN1, QMIN1.
Returns the minimum exponent in the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type real. It may be scalar or array valued.
Default integer scalar.
The result has the value emin, as defined in “The Real Number System Model”.
Returns the location of the first element of ARRAY having the minimum value of the elements identified by MASK.
Transformational function.
must be of type integer or real. It must not be scalar.
must be of type logical and must be conformable with ARRAY.
The result is of type default integer; it is an array of rank one and of size equal to the rank of ARRAY.
If MASK is absent, the result is a rank-one array whose element values are the values of the subscripts of an element of ARRAY whose value equals the minimum value of all the elements of ARRAY.
The ith subscript returned lies in the range 1 to ei, where ei is the extent of the ith dimension of ARRAY.
If more than one element has the minimum value, the element whose subscripts are returned is the first such element, taken in array element order. If ARRAY has size zero, the value of the result is processor-dependent.
If MASK is present, the result is a rank-one array whose element values are the values of the subscripts of an element of ARRAY, corresponding to a .TRUE. element of MASK, whose value equals the minimum value of all such elements of ARRAY.
The ith subscript returned lies in the range 1 to ei, where ei is the extent of the ith dimension of ARRAY. If more than one such element has the minimum value, the element whose subscripts are returned is the first such element taken in array element order.
If ARRAY has size zero or every element of MASK has the value .FALSE., the value of the result is processor-dependent.
In both cases, an element of the result is undefined if the processor cannot represent the value as a default integer.
KMINLOC.
Minimum value of all the elements of ARRAY along dimension DIM corresponding to .TRUE. elements of MASK.
Transformational function.
must be of type integer or real. It must not be scalar.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
must be of type logical and must be conformable with ARRAY.
The result is of the same type and kind type parameter as ARRAY. It is scalar if DIM is absent or ARRAY has rank one; otherwise, the result is an array of rank n-1 and of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn) where (d1, d2, ..., dn) is the shape of ARRAY.
The result of MINVAL(ARRAY) has a value equal to the minimum value of all the elements of ARRAY or has the value of the positive number of the largest magnitude supported by the processor for numbers of the type and kind type parameter of ARRAY if ARRAY has size zero.
The result of MINVAL(ARRAY, MASK = MASK) has a value equal to the minimum value of the elements of ARRAY corresponding to .TRUE. elements of MASK or has the value of the positive number of the largest magnitude supported by the processor for numbers of the same type and kind type parameter as ARRAY if there are no .TRUE. elements.
If ARRAY has rank one, MINVAL(ARRAY, DIM [,MASK]) has a value equal to that of MINVAL(ARRAY [,MASK = MASK]). Otherwise, the value of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of MINVAL(ARRAY, DIM [,MASK]) is equal to the following:
MINVAL(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) [, MASK= MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) ] )
Elemental function.
must be of type integer or real.
must be of the same type and kind type parameter as A.
Same as A.
If P is not 0, the value of the result is A - INT(A/P) * P. If P=0, the result is processor-dependent.
AMOD, BMOD, DMOD, HMOD, IMOD, JMOD, KMOD, QMOD.
Elemental function.
must be of type integer or real.
must be of the same type and kind type parameter as A.
Same as A.
A is of type integer. If P is not 0, MODULO(A, P) has the value R such that A = Q * P + R, where Q is an integer, the inequalities 0 <= R<P hold if P>0, and P<R <= 0 hold if P<0. If P=0, the result is processor-dependent.
A is of type real. If P is not 0, the value of the result is A -FLOOR (A / P) * P. If P=0, the result is processor-dependent.
Copies a sequence of bits from one data object to another.
Elemental subroutine.
must be of type integer. It is an INTENT(IN) argument.
must be of type integer and nonnegative. It is an INTENT(IN) argument. FROMPOS + LEN must be less than or equal to BIT_SIZE(FROM). The model for the interpretation of an integer value as a sequence of bits is described in “The Bit Model”.
must be of type integer and nonnegative. It is an INTENT(IN) argument.
must be a variable of type integer with the same kind type parameter value as FROM and may be the same variable as FROM. It is an INTENT(INOUT) argument.
TO is set by copying the sequence of bits of length LEN, starting at position FROMPOS of FROM to position TOPOS of TO. No other bits of TO are altered. On return, the LEN bits of TO starting at TOPOS are equal to the value that the LEN bits of FROM starting at FROMPOS had on entry.
The model for the interpretation of an integer value as a sequence of bits is described in “The Bit Model”.
must be of type integer and nonnegative. It is an INTENT(IN) argument. TOPOS + LEN must be less than or equal to BIT_SIZE(TO).
BMVBITS, HMVBITS.
Returns the nearest different machine representable number in a given direction.
Elemental function.
must be of type real.
must be of type real and not equal to zero.
Same as X.
The result has a value equal to the machine representable number distinct from X and nearest to it in the direction of the infinity with the same sign as S.
Nearest integer.
Elemental function.
must be of type real.
must be a scalar integer initialization expression.
Integer. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default integer type.
If A>0, NINT(A) has the value INT(A+0.5); if A <= 0, NINT(A) has the value INT(A-0.5). The result is undefined if the processor cannot represent the result in the specified integer type.
IDNINT, IIDNNT,IIQNNT, ININT, IQNINT, JIDNNT,JIQNNT, JNINT, KIDNNT, KIQNNT, KNINT.
Performs a bitwise logical complement.
Elemental function.
I must be of type integer.
Same as I.
The result has the value obtained by complementing I bit-by-bit according to the following truth table:
The model for the interpretation of an integer value as a sequence of bits is described in “The Bit Model”.
BNOT, HNOT, INOT, JNOT, KNOT.
Elemental nonstandard function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by performing an OR on I and J bit-by-bit according to the following truth table:
The model for interpreting an integer value as a sequence of bits is described in “The Bit Model”.
Pack an array into an array of rank one under the control of a mask.
Transformational function.
may be of any type. It must not be scalar.
must be of type logical and must be conformable with ARRAY.
must be of the same type and type parameters as ARRAY and must have rank one. VECTOR must have at least as many elements as there are .TRUE. elements in MASK. If MASK is scalar with the value .TRUE., VECTOR must have at least as many elements as there are in ARRAY.
The result is an array of rank one with the same type and type parameters as ARRAY. If VECTOR is present, the result size is that of VECTOR; otherwise, the result size is the number t of .TRUE. elements in MASK unless MASK is scalar with the value .TRUE., in which case the result size is the size of ARRAY.
Element i of the result is the element of ARRAY that corresponds to the ith .TRUE. element of MASK, taking elements in array element order, for i= 1, 2, ..., t. If VECTOR is present and has size n>t, element i of the result has the value VECTOR (i), for i= t+1, ..., n.
KPACK.
Returns the decimal precision in the model representing real numbers with the same kind type parameter as the argument.
Inquiry function.
X must be of type real or complex. It may be scalar or array valued.
Default integer scalar.
The result has the value INT((p-1) * LOG10(b))+k. The values of b and p are as defined in “The Real Number System Model” for the model representing real numbers with the same kind type parameter as X. The value of k is 1 if b is an integral power of 10 and 0 otherwise.
Determine whether an optional argument is present.
Inquiry function.
A must be the name of an optional dummy argument that is accessible in the procedure in which the PRESENT function reference appears.
Default logical scalar.
The result has the value .TRUE. if A is present and otherwise has the value .FALSE.
Product of all the elements of ARRAY along dimension DIM corresponding to the .TRUE. elements of MASK.
Transformational function.
must be of type integer, real, or complex. It must not be scalar.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
must be of type logical and must be conformable with ARRAY.
The result is of the same type and kind type parameter as ARRAY. It is scalar if DIM is absent or ARRAY has rank one; otherwise, the result is an array of rank n-1 and of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn) where (d1, d2, ..., dn) is the shape of ARRAY.
The result of PRODUCT(ARRAY) has a value equal to a processor-dependent approximation to the product of all the elements of ARRAY or has the value one if ARRAY has size zero.
The result of PRODUCT(ARRAY, MASK = msk) has a value equal to a processor-dependent approximation to the product of the elements of ARRAY corresponding to the .TRUE. elements of msk or has the value one if there are no .TRUE. elements.
If ARRAY has rank one, PRODUCT(ARRAY, DIM [,msk]) has a value equal to that of PRODUCT(ARRAY [,MASK = msk]). Otherwise, the value of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of PRODUCT(ARRAY, DIM [,msk]) is equal to the following:
PRODUCT(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) &
[, MASK = msk(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)])
Elemental nonstandard function.
A must be of type integer, real, double precision, or complex.
REAL(16).
QEXTD.
Elemental nonstandard function.
A must be of type integer or REAL(4).
REAL(16).
QFLOATI, QFLOTI, QFLOTJ, QFLOTK.
Convert character to REAL(16) type.
Elemental nonstandard function.
I must be of type character.
REAL(16) type.
Double precision product.
Elemental nonstandard function.
X and Y must be of type double precision.
REAL(16) type.
Returns the base of the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type integer or real. It may be scalar or array valued.
Default integer scalar.
The result has the value r if X is of type integer and the value b if X is of type real, where r and b are as defined in “The Real Number System Model”.
Multiplicative congruent random number generator.
Elemental nonstandard function.
ISEED must be an INTEGER(4) variable or array element. RAN stores a number in ISEED to be used by the next call to RAN.
ISEED should initially be set to an odd number, preferably very large; see the following example.
REAL(4) type.
| NOTE: To ensure different random values for each run of a program, ISEED should be set to a different value each time the program is run. One way to implement this would be to have the user enter the seed at the start of the program. Another way would be to compute a value from the current year, day, and month (returned by IDATE) and the number of seconds since midnight (returned by SECNDS). | |
Generate successive pseudorandom numbers uniformly distributed in the range of 0.0 to 1.0.
Elemental nonstandard function.
REAL(4) type.
| NOTE: For details about restarting the pseudorandom number generator used by IRAND and RAND, see “SRAND(ISEED)” section. | |
Returns one pseudorandom number or an array of pseudorandom numbers from the uniform distribution over the range 0 <= x < 1.
Subroutine.
HARVEST must be of type real. It is an INTENT(OUT) argument. It may be a scalar or an array variable. It is set to contain pseudorandom numbers from the uniform distribution in the interval 0 <= x < 1.
Restarts or queries the pseudorandom number generator used by RANDOM_NUMBER.
Subroutine.
There must either be exactly one or no arguments present.
must be scalar and of type default integer. It is an INTENT(OUT) argument. It is set to the number N of integers that the processor uses to hold the value of the seed.
must be a default integer array of rank one and size >= N. It is an INTENT(IN) argument. It is used by the processor to set the seed value.
must be a default integer array of rank one and size >= N. It is an INTENT(OUT) argument. It is set by the processor to the current value of the seed. If no argument is present, the processor sets the seed to a processor-dependent value.
Returns the decimal exponent range in the model representing integer or real numbers with the same kind type parameter as the argument.
Inquiry function.
X must be of type integer, real, or complex. It may be scalar or array valued.
Default integer scalar.
For an integer argument, the result has the value INT(LOG10(huge)), where huge is the largest positive integer in the model representing integer numbers with same kind type parameter as X. See “The Integer Number System Model” for more information.
For a real or complex argument, the result has the value INT(MIN(LOG10(huge), -LOG10(tiny))), where huge and tiny are the largest and smallest positive numbers in the model representing real numbers with the same value for the kind type parameter as X. See “The Real Number System Model” for more information.
RANGE(X) has the value 38 for real X, whose model is described in “The Real Number System Model”, because in this case huge= (1 - 2-24) * 2127 and tiny = 2-127.
SNGL, SNGLQ.
Convert to real type.
Elemental function.
must be of type integer, real, or complex.
must be a scalar integer initialization expression.
Real.
If A is of type integer or real and KIND is present, the kind type parameter is that specified by KIND.
If A is of type integer or real and KIND is not present, the kind type parameter is the processor-dependent kind type parameter for the default real type.
If A is of type complex and KIND is present, the kind type parameter is that specified by KIND.
If A is of type complex and KIND is not present, the kind type parameter is the kind type parameter of A.
If A is of type integer or real, the result is equal to a processor-dependent approximation to A.
If A is of type complex, the result is equal to a processor-dependent approximation to the real part of A.
FLOAT, FLOATI, FLOATJ, FLOATK.
Concatenate several copies of a string.
Transformational function.
must be scalar and of type character.
must be scalar and of type integer. Its value must not be negative.
Character scalar of length NCOPIES times that of STRING, with the same kind type parameter as STRING.
The value of the result is the concatenation of NCOPIES copies of STRING.
KREPEAT.
Constructs an array of a specified shape from the elements of a given array.
Transformational function.
may be of any type. It must be array valued. If PAD is absent or of size zero, the size of SOURCE must be greater than or equal to PRODUCT(SHAPE). The size of the result is the product of the values of the elements of SHAPE.
must be of type integer, rank one, and constant size. Its size must be positive and less than 8. It must not have an element whose value is negative.
must be of the same type and type parameters as SOURCE. PAD must be array valued.
must be of type integer, must have the same shape as SHAPE, and its value must be a permutation of [1, 2, ..., n], where n is the size of SHAPE. If absent, it is as if it were present with value [1, 2, ..., n].
The result is an array of shape SHAPE (that is, SHAPE(RESHAPE(SOURCE, SHAPE, PAD, ORDER)) is equal to SHAPE) with the same type and type parameters as SOURCE.
The elements of the result, taken in permuted subscript order ORDER(1), ..., ORDER(n), are those of SOURCE in normal array element order followed if necessary by those of PAD in array element order, followed if necessary by additional copies of PAD in array element order.
KRESHAPE.
Convert character to real type.
Elemental nonstandard function.
I must be of type character.
Default real type.
Returns the reciprocal of the relative spacing of model numbers near the argument value.
Elemental function.
X must be of type real.
Same as X.
The result has the value |X * b-e| * bp, where b, e, and p are as defined in “The Real Number System Model”.
Returns X * bI where b is the base in the model representation of X. See “The Real Number System Model” for a description of this.
Elemental function.
must be of type real.
must be of type integer.
Same as X.
The result has the value X * bI, where b is defined in “The Real Number System Model”, provided this result is within range; if not, the result is processor dependent.
Scan a string for any one of the characters in a set of characters.
Elemental function.
must be of type character.
must be of type character with the same kind type parameter as STRING.
must be of type logical.
Default integer.
If BACK is absent or is present with the value .FALSE. and if STRING contains at least one character that is in SET, the value of the result is the position of the leftmost character of STRING that is in SET.
If BACK is present with the value .TRUE. and if STRING contains at least one character that is in SET, the value of the result is the position of the rightmost character of STRING that is in SET.
The value of the result is zero if no character of STRING is in SET or if the length of STRING or SET is zero.
Return the number of seconds that have elapsed since midnight, less the value of the argument.
Elemental nonstandard function.
X must be of type REAL(4).
REAL(4).
| NOTE: SECNDS is accurate to one one-hundredth of a second (0.01 second). The SECNDS routine is useful for computing elapsed time for a code’s execution. | |
Returns a value of the kind type parameter of an integer data type that represents all integer values n with -10R < n < 10R.
Transformational function.
R must be scalar and of type integer.
Default integer scalar.
The result has a value equal to the value of the kind type parameter of an integer data type that represents all values n in the range of values n with -10R < n < 10R, or if no such kind type parameter is available on the processor, the result is -1.
If more than one kind type parameter meets the criteria, the value returned is the one with the smallest decimal exponent range, unless there are several such values, in which case the smallest of these kind values is returned.
Returns a value of the kind type parameter of a real data type with decimal precision of at least P digits and a decimal exponent range of at least R.
Transformational function.
At least one argument must be present.
must be scalar and of type integer.
must be scalar and of type integer.
Default integer scalar.
The result has a value equal to a value of the kind type parameter of a real data type with decimal precision, as returned by the function PRECISION, of at least P digits and a decimal exponent range, as returned by the function RANGE, of at least R.
If no such kind type parameter is available on the processor, the result is -1 if the precision is not available, -2 if the exponent range is not available, and -3 if neither is available.
If more than one kind type parameter value meets the criteria, the value returned is the one with the smallest decimal precision, unless there are several such values, in which case the smallest of these kind values is returned.
Returns the model number whose exponent is I and whose fractional part is the fractional part of X.
Elemental function.
must be of type real.
must be of type integer.
Same as X.
The result has the value X * bI-e, where b and e are as defined in “The Real Number System Model”, provided this result is within range; if not, the result is processor-dependent.
If X has value zero, the result has value zero.
Returns the shape of an array or a scalar.
Inquiry function.
SOURCE may be of any type. It may be array valued or scalar. It must not be a pointer that is disassociated or an allocatable array that is not allocated. It must not be an assumed-size array.
The result is a default integer array of rank one whose size is equal to the rank of SOURCE.
The value of the result is the shape of SOURCE.
KSHAPE.
Absolute value of A times the sign of B.
Elemental function.
must be of type integer or real.
must be of the same type and kind type parameter as A.
Same as A.
The value of the result is |A| if B>= 0 and -|A| if B < 0.
Elemental function.
X must be of type real or complex.
The result has a value equal to a processor-dependent approximation to sin(X).
If X is of type real, it is regarded as a value in radians.
If X is of type complex, its real part is regarded as a value in radians.
CDSIN, CSIN, DSIN, QSIN, ZSIN.
Elemental nonstandard function.
X must be of type real.
Same as X.
The result has a value equal to a processor-dependent approximation to sin(X).
QSIND.
Elemental function.
X must be of type real.
Same as X.
The result has a value equal to a processor-dependent approximation to sinh(X).
QSINH.
Returns the extent of an array along a specified dimension or the total number of elements in the array.
Inquiry function.
may be of any type. It must not be scalar. It must not be a pointer that is disassociated or an allocatable array that is not allocated. If ARRAY is an assumed-size array, DIM must be present with a value less than the rank of ARRAY.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY.
Default integer scalar.
The result has a value equal to the extent of dimension DIM of ARRAY or, if DIM is absent, the total number of elements of ARRAY.
KSIZE.
Return the number of bytes of storage used by the argument.
Inquiry nonstandard function.
A may be of any type (except assumed-size arrays or passed-length character arguments).
Integer.
Returns the absolute spacing of model numbers near the argument value.
Elemental function.
X must be of type real.
Same as X.
If X is not zero, the result has the value be-p, where b, e, and p are as defined in “The Real Number System Model”, provided this result is within range; otherwise, the result is the same as that of TINY(X).
Replicates an array by adding a dimension. Broadcasts several copies of SOURCE along a specified dimension (as in forming a book from copies of a single page) and thus forms an array of rank one greater.
Transformational function.
may be of any type. It may be scalar or array valued. The rank of SOURCE must be less than 7.
must be scalar and of type integer with value in the range 1 <= DIM <= n + 1, where n is the rank of SOURCE.
must be scalar and of type integer.
The result is an array of the same type and type parameters as SOURCE and of rank n + 1, where n is the rank of SOURCE.
If SOURCE is scalar, the shape of the result is (MAX(NCOPIES, 0)).
If SOURCE is array valued with shape (d1, d2, ..., dn), the shape of the result is (d1, d2, ..., dDIM-1, MAX(NCOPIES, 0), dDIM, ..., dn).
If SOURCE is scalar, each element of the result has a value equal to SOURCE.
If SOURCE is array valued, the element of the result with subscripts (r1, r2, ..., rn+1) has the value SOURCE(r1, r2, ..., rDIM-1, rDIM+1, ..., rn+1).
Elemental function.
X must be of type real or complex. If X is real, its value must be greater than or equal to zero.
Same as X.
The result has a value equal to a processor-dependent approximation to the square root of X.
A result of type complex is the principal value with the real part greater than or equal to zero. When the real part of the result is zero, the imaginary part is greater than or equal to zero.
CDSQRT,CSQRT, DSQRT, QSQRT, ZSQRT.
Restart the pseudorandom number generator used by IRAND and RAND.
Elemental nonstandard subroutine.
ISEED must be of INTEGER(4) type.
The same value for ISEED generates the same sequence of random numbers. To vary the sequence, call SRAND with a different ISEED value each time the program is executed. The default for ISEED is 1.
Sum all the elements of ARRAY along dimension DIM corresponding to the .TRUE. elements of MASK.
Transformational function.
must be of type integer, real, or complex. It must not be scalar.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
must be of type logical and must be conformable with ARRAY.
The result is of the same type and kind type parameter as ARRAY. It is scalar if DIM is absent of ARRAY has rank one; otherwise, the result is an array of rank n-1 and of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn) where (d1, d2, ..., dn) is the shape of ARRAY.
The result of SUM(ARRAY) has a value equal to a processor-dependent approximation to the sum of all the elements of ARRAY or has the value zero if ARRAY has size zero.
The result of SUM(ARRAY, MASK = msk) has a value equal to a processor-dependent approximation to the sum of the elements of ARRAY corresponding to the .TRUE. elements of msk or has the value zero if there are no .TRUE. elements.
If ARRAY has rank one, SUM(ARRAY, DIM [,msk]) has a value equal to that of SUM(ARRAY [,MASK = msk]). Otherwise, the value of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of SUM(ARRAY, DIM [,msk]) is equal to the following:
SUM(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn) &
[, MASK=msk(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)])
Issue a shell command from a Fortran 90 program.
Nonstandard subroutine.
STR must be of type character. SYSTEM gives STR to the default shell (/bin/sh) as input, as if the string were entered at a terminal. When the shell has completed, the process continues.
Returns integer data from a real-time clock.
Subroutine.
must be scalar and of type default integer. It is an INTENT(OUT) argument. It is set to a processor-dependent value based on the current value of the processor clock or to -HUGE(0) if there is no clock. The processor-dependent value is incremented by one for each clock count until the value COUNT_MAX is reached and is reset to zero at the next count. It lies in the range 0 to COUNT_MAX if there is a clock.
must be scalar and of type default integer. It is an INTENT(OUT) argument. It is set to the number of processor clock counts per second, or to zero if there is no clock.
must be scalar and of type default integer. It is an INTENT(OUT) argument. It is set to the maximum value that COUNT can have, or to zero if there is no clock.
Elemental function.
X must be of type real.
Same as X.
The result has a value equal to a processor-dependent approximation to tan(X), with X regarded as a value in radians.
CTAN,DTAN,QTAN,ZTAN.
Elemental nonstandard function.
X must be of type real.
Same as X.
The result has a value equal to a processor-dependent approximation to tan(X).
DTAND, QTAND.
Elemental function.
X must be of type real.
The result has a value equal to a processor-dependent approximation to tanh(X).
DTANH, QTANH.
Return the current system time.
Nonstandard subroutine.
TIMESTR must be of type character and must provide at least 8 bytes of storage.
TIME fills TIMESTR with an 8-byte character string of the form hh:mm:ss (hh is the current hour, mm the current minute, ss the number of seconds past the minute).
Returns the smallest positive number in the model representing numbers of the same type and kind type parameter as the argument.
Inquiry function.
X must be of type real. It may be scalar or array valued.
Scalar with the same type and kind type parameter as X.
The result has the value bemin-1
where b and emin are as defined in “The Real Number System Model”.
Returns a result with a physical representation identical to that of SOURCE but interpreted with the type and type parameters of MOLD.
Transformational function.
may be of any type and may be scalar or array valued.
may be of any type and may be scalar or array valued.
must be scalar and of type integer. The corresponding actual argument must not be an optional dummy argument.
The result is of the same type and type parameters as MOLD.
If MOLD is a scalar and SIZE is absent, the result is a scalar.
If MOLD is array valued and SIZE is absent, the result is array valued and of rank one. Its size is as small as possible such that its physical representation is not shorter than that of SOURCE.
If SIZE is present, the result is array valued of rank one and size SIZE.
If the physical representation of the result has the same length as that of SOURCE, the physical representation of the result is that of SOURCE.
If the physical representation of the result is longer than that of SOURCE, the physical representation of the leading part is that of SOURCE and the remainder is undefined.
If the physical representation of the result is shorter than that of SOURCE, the physical representation of the result is the leading part of SOURCE. If D and E are scalar variables such that the physical representation of D is as long as or longer than that of E, the value of TRANSFER(TRANSFER(E, D), E) must be the value of E.
If D is an array and E is an array of rank one, the value of TRANSFER(TRANSFER(E, D), E, SIZE(E)) must be the value of E.
Transpose an array of rank two.
Transformational function.
MATRIX may be of any type and must have rank two.
The result is an array of the same type and type parameters as MATRIX and with rank two and shape (n, m) where (m, n) is the shape of MATRIX.
Element (i, j) of the result has the value MATRIX(j, i), i= 1, 2, ..., n; j= 1, 2, ..., m.
Returns the argument with trailing blank characters removed.
Transformational function.
STRING must be of type character and must be a scalar.
Character with the same kind type parameter value as STRING and with a length that is the length of STRING less the number of trailing blanks in STRING.
The value of the result is the same as STRING except any trailing blanks are removed. If STRING contains no nonblank characters, the result has zero length.
DIM
Returns all the upper bounds of an array or a specified upper bound.
Inquiry function.
may be of any type. It must not be scalar. It must not be a pointer that is disassociated or an allocatable array that is not allocated. If ARRAY is an assumed-size array, DIM must be present with a value less than the rank of ARRAY.
must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.
The result is of type default integer. It is scalar if DIM is present; otherwise, the result is an array of rank one and size n, where n is the rank of ARRAY.
For an array section or for an array expression, other than a whole array or array structure component, UBOUND(ARRAY, DIM) has a value equal to the number of elements in the given dimension; otherwise, it has a value equal to the upper bound for subscript DIM of ARRAY if dimension DIM of ARRAY does not have size zero and has the value zero if dimension DIM has size zero.
UBOUND(ARRAY) has a value whose ith component is equal to UBOUND(ARRAY, i), for i= 1, 2, ..., n, where n is the rank of ARRAY.
KUBOUND.
Unpack an array of rank one into an array under the control of a mask.
Transformational function.
may be of any type. It must have rank one. Its size must be at least t where t is the number of .TRUE. elements in MASK.
must be array valued and of type logical.
must be of the same type and type parameters as VECTOR and must be conformable with MASK.
The result is an array of the same type and type parameters as VECTOR and the same shape as MASK.
The element of the result that corresponds to the ith .TRUE. element of MASK, in array element order, has the value VECTOR(i) for i=1, 2, ..., t, where t is the number of .TRUE. values in MASK. Each other element has a value equal to FIELD if FIELD is scalar or to the corresponding element of FIELD if it is an array.
Verify that a set of characters contains all the characters in a string by identifying the position of the first character in a string of characters that does not appear in a given set of characters.
Elemental function.
must be of type character.
must be of type character with the same kind type parameter as STRING.
must be of type logical.
Default integer.
If BACK is absent or present with the value .FALSE. and if STRING contains at least one character that is not in SET, the value of the result is the position of the leftmost character of STRING that is not in SET.
If BACK is present with the value .TRUE. and if STRING contains at least one character that is not in SET, the value of the result is the position of the rightmost character of STRING that is not in SET.
The value of the result is zero if each character in STRING is in SET or if STRING has zero length.
Elemental nonstandard function.
must be of type integer.
must be of type integer with the same kind type parameter as I.
Same as I.
The result has the value obtained by performing an exclusive OR on I and J bit-by-bit according to Table 11-9 “Truth table for IXOR intrinsic”.
The model for interpreting an integer value as a sequence of bits is described in “The Bit Model”.
Elemental nonstandard function.
A must be of type integer or logical.
ZEXT converts a 1-, 2-, or 4-byte logical or integer to a 2- or 4-byte integer by sign-extending zeroes instead of the actual sign bit.
|
|||||||||||||||