| United States-English |
|
|
|
![]() |
HP Fortran 90 Programmer's Reference: HP Series 700/800 Computers > Chapter 11 Intrinsic proceduresIntrinsic procedure specifications |
|
This section contains detailed specifications of HP Fortran 90 intrinsic procedures, which are listed in alphabetical order. For a summary of all generic as well as specific intrinsic procedures, see Table 11-6 “ Generic and specific intrinsic procedures”. All of the intrinsic procedures in this section are generic. This means that each intrinsic procedure may be called with more than one argument type/kind/rank pattern. 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 keywords, in which case the actual argument expression is preceded by the dummy argument name (the argument keyword) and an "=" symbol. These argument keywords are shown in the following descriptions of the procedures. 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. Nonstandard subroutine. Example. The following program aborts before the second PRINT statement.
This program produces the following output, followed by core dump information.
Class. Elemental function. Argument. A must be of type integer, real, or complex. Result Type and Type Parameter. The same as A except that if A is complex, the result is real. Result Value. If A is of type integer or real, the value of the result is |A|. If A is complex with value (x, y), the result is equal to a processor-dependent approximation to the square root of (x² + y²). Examples. ABS(-1) has the value 1. ABS(-1.5) has the value 1.5. ABS((3.0, 4.0)) has the value 5.0. Description. Returns the character in a specified position of the ASCII collating sequence. It is the inverse of the IACHAR function. Class. Elemental function. Argument. I must be of type integer. Result Type and Type Parameter. Character of length one with kind type parameter value KIND('A'). Result Value. If I has a value in the range 0 <= I <= 127, the result is the character in position I of the ASCII collating sequence, provided the processor is capable of representing that character; otherwise, the result is processor-dependent. If the processor is not capable of representing both uppercase and lowercase letters and I corresponds to a letter in a case that the processor is not capable of representing, the result is the letter in the case that the processor is capable of representing. ACHAR(IACHAR(C)) must have the value C for any character C capable of representation in the processor. Examples. ACHAR(88) is 'X'. ACHAR(42) is '*'. Description. Arccosine (inverse cosine) function in radians. Class. Elemental function. Argument. X must be of type real with a value that satisfies the inequality |X| <= 1. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arccos(X), expressed in radians. It lies in the range 0 <= ACOS(X) <= Pi. Examples. ACOS(0.54030231) has the value 1.0. ACOS(.1_HIGH) has the value 1.4706289056333 with kind HIGH. Description. Arccosine (inverse cosine) function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real with a value that satisfies the inequality |X| <= 1. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arccos(X), expressed in degrees. It lies in the range 0 <= ACOSD(X) <= 180. Examples. ACOSD(0.0000001) has the value 89.99999. ACOSD(0.5) has the value 60.0. ACOSD(-1.0) has the value 180.0. Description. Hyperbolic arccosine of radians. Class. Elemental nonstandard function. Argument. X must be of type real with a value X >= 1. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the hyperbolic arccosine of X. It lies in the range 0 <= ACOSH(X). Examples. ACOSH(1.0) has the value 0.0. ACOSH(180.0) has the value 5.8861. ACOSH(0.0) has the value NaN (not a number). Description. Adjust to the left, removing leading blanks and inserting trailing blanks. Class. Elemental function. Argument. STRING must be of type character. Result Type. Character of the same length and kind type parameter as STRING. Result Value. The value of the result is the same as STRING except that any leading blanks have been deleted and the same number of trailing blanks have been inserted. Example. ADJUSTL('bbWORD') is 'WORDbb'. Description. Adjust to the right, removing trailing blanks and inserting leading blanks. Class. Elemental function. Argument. STRING must be of type character. Result Type. Character of the same length and kind type parameter as STRING. Result Value. The value of the result is the same as STRING except that any trailing blanks have been deleted and the same number of leading blanks have been inserted. Examples. ADJUSTR('WORDbb') has the value 'bbWORD'. Description. Imaginary part of a complex number. Class. Elemental function. Argument. Z must be of type complex. Result Type and Type Parameter. Real with the same kind type parameter as Z. Result Value. If Z has the value (x, y), the result has value y. Examples. AIMAG((2.0, 3.0)) has the value 3.0. AIMAG((2.0_HIGH, 3.0)) has the value 3.0 with kind HIGH; the parts of a complex literal constant have the same precision, which is that of the part with the greatest precision. Description. Truncation to a whole number. Class. Elemental function. Arguments.
Result Type and Type Parameter. The result is of type real. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of A. Result Value. If |A| < 1, AINT(A) has the value 0; if A >= 1, AINT(A) has a value equal to 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. Examples. AINT(2.783) has the value 2.0. AINT(-2.783) has the value -2.0. AINT(2.1111111111111_HIGH) and AINT(2.1111111111111, HIGH) have the value 2.0 with kind HIGH. Description. Determine whether all values are .TRUE. in MASK along dimension DIM. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of type logical with the same kind type parameter as MASK. It is scalar if DIM is absent or MASK 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 MASK. Result Value.
Examples.
Description. Indicate whether or not an allocatable array is currently allocated. Class. Inquiry function. Argument. ARRAY must be an allocatable array. Result Type, Type Parameter, and Shape. Default logical scalar. Result Value. The result has the value .TRUE. if ARRAY is currently allocated and has the value .FALSE. if ARRAY is not currently allocated. The result is undefined if the allocation status of the array is undefined. Example. If the following statements are processed
then T is printed. Description. Logical AND. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. The result has the value obtained by performing a logical AND 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 in “The bit model”. Example. The following program produces the output " 11 5 1". K is assigned the binary value 0001, which is 1 in decimal.
Description. Nearest whole number. Class. Elemental function. Arguments.
Result Type and Type Parameter. The result is of type real. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of A. Result Value. If A>0, ANINT(A) has the value AINT(A+0.5); if A <= 0, ANINT(A) has the value AINT(A-0.5). Examples. ANINT(2.783) has the value 3.0. ANINT(-2.783) has the value -3.0. ANINT(2.7837837837837_HIGH) and ANINT(2.7837837837837,HIGH) have the value 3.0 with kind HIGH. Description. Determine whether any value is .TRUE. in MASK along dimension DIM. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of type logical with the same kind type parameter as MASK. It is scalar if DIM is absent or MASK 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 MASK. Result Value.
Examples.
Description. Arcsine (inverse sine) function in radians. Class. Elemental function. Argument. X must be of type real. Its value must satisfy the inequality |X| >= 1. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arcsin(X), expressed in radians. It lies in the range -Pi/2 <= ASIN(X) <= Pi/2. Examples. ASIN(0.84147098) has the value 1.0. ASIN(1.0_HIGH) has the value 1.5707963267949 with kind HIGH. Description. Arcsine (inverse sine) function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real. Its value must satisfy the inequality |X| <= 1. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arcsin(X), expressed in degrees. It lies in the range -90 <= ASIN(X) <= 90. Examples. ASIND(-1.0) has the value -90.0. ASIND(0.5) has the value 30.0. Description. Hyperbolic arcsine of radians. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the hyperbolic arcsine of X. Examples. ASINH(-1.0) has the value -0.88137. ASINH(180.0) has the value 5.88611. Description. Returns the association status of its pointer argument or indicates the pointer is associated with the target. Class. Inquiry function. Arguments.
Result Type. The result is scalar of type default logical. Result Value.
Examples.
Description. Arctangent (inverse tangent) function in radians. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arctan(X), expressed in radians, that lies in the range -Pi/2 <= ATAN(X) <= Pi/2. Examples. ATAN(1.5574077) has the value 1.0. ATAN(2.0_HIGH/3.0) has the value 0.58800260354757 with kind HIGH. Description. Arctangent (inverse tangent) function in radians. The result is the principal value of the argument of the nonzero complex number (X, Y). Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the principal value of the argument of the complex number (X, Y), expressed in radians. The result lies in the range -Pi <= ATAN2(Y, X) <= Pi and is equal to a processor-dependent approximation to a value of arctan(Y/X) if X is not 0. If Y>0, the result is positive. If Y=0, the result is zero if X>0 and the result is Pi if X<0. If Y<0, the result is negative. If X=0, the absolute value of the result is Pi/2. Examples. ATAN2(1.5574077, 1.0) has the value 1.0. If Y has the value
and X has the value
then the value of ATAN2(Y, X) is
Description. Arctangent (inverse tangent) function in degrees. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the principal value of the argument of the complex number (X, Y), expressed in degrees, that lies in the range -90 < ATAN2D(Y,X) < 90. Examples. ATAN2D(1.0, 1.0) has the value 45.0. ATAN2D(1.0, 0.0) has the value 90.0. ATAN2D(8735.0, 1.0) has the value 89.99344. Description. Arctangent (inverse tangent) function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to arctan(X), expressed in degrees, that lies in the range -90 < ATAND(X) < 90. Examples. ATAND(1.0) has the value 45.0. ATAND(0.0) has the value 0.0. ATAND(-94373.0) has the value -89.9994. Description. Hyperbolic arctangent of radians. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the hyperbolic arctangent of X. Examples. ATANH(0.0) has the value 0.0. ATANH(-0.77) has the value -1.02033. ATANH(0.5) has the value 0.549306. Description. Return the address of X. Class. Inquiry nonstandard function. Argument. X may be of any type. Result Type. The result is of type default integer. Example. The following program:
Could produce this output:
Description. Returns the number of bits n, defined by the model in “The bit model”, for integers with the kind parameter of the argument. Class. Inquiry function. Argument. I must be of type integer. Result Type, Type Parameter, and Shape. Scalar integer with the same kind type parameter as I. Result Value. The result has the value of the number of bits n in the model integer, defined for bit manipulation contexts in “The bit model”, for integers with the kind parameter of the argument. Examples. BIT_SIZE(1) has the value 32 if n in the model is 32. Description. Tests a bit of an integer value. Class. Elemental function. Arguments.
Result Type. The result is of type default logical. Result Value. The result has the value .TRUE. if bit POS of I has the value 1 and has the value .FALSE. if bit POS of I has the value 0. The model for the interpretation of an integer value as a sequence of bits is in “The bit model”. Examples. BTEST(8, 3) has the value .TRUE.. BTEST(8_SHORT, 3) has the value .TRUE.. If A has the value [1, 2, 3, 4] then the value of BTEST(A, 2) is [.FALSE., .FALSE., .FALSE., .TRUE.] and the value of BTEST(2, A) is [.TRUE., .FALSE., .FALSE., .FALSE.]. Description. Returns the least integer greater than or equal to its argument. Class. Elemental function. Argument. A must be of type real. Result Type and Type Parameter. Default integer. Result Value. The result has a value equal to the least integer greater than or equal to A. The result is undefined if the processor cannot represent this value in the default integer type. Examples. CEILING(3.7) has the value 4. CEILING(-3.7) has the value -3. CEILING(20.0_HIGH/3) has the value 7. Description. Returns the character in a given position of the processor collating sequence associated with the specified kind type parameter. It is the inverse of the function ICHAR. Class. Elemental function. Arguments.
Result Type and Type Parameters. Character of length one. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default character type. Result Value. The result is the character in position I of the collating sequence associated with the specified kind type parameter. ICHAR(CHAR(I, KIND(C))) must have the value I for 0 <= I <= n-1 and CHAR(ICHAR(C), KIND(C)) must have the value C for any character C capable of representation in the processor. CHAR(88) is 'X' on a processor using the ASCII collating sequence. Description. Convert to complex type. Class. Elemental function. Arguments.
Result Type and Type Parameter. The result is of type complex. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default real type. Result Value. If Y is absent and X is not complex, it is as if Y were present with the value zero. If Y is absent and X is complex, it is as if Y were present with the value AIMAG(X). CMPLX(X,Y,KIND) has the complex value whose real part is REAL(X,KIND) and whose imaginary part is REAL(Y,KIND). Examples. CMPLX(-3) is -3.0 + 0i. CMPLX((4.1,0.0), KIND=HIGH), CMPLX((4.1,0), KIND=HIGH), and CMPLX(4.1, KIND=HIGH) are each 4.1 + 0.0i with kind HIGH. Description. Conjugate of a complex number. Class. Elemental function. Argument. Z must be of type complex. Result Type and Type Parameter. Same as Z. Result Value. If Z has the value (x, y), the result has the value (x, -y). Examples. CONJG((2.0, 3.0) is (2.0, - 3.0). CONJG((0., -4.1_HIGH)) is 0 + 4.1i with kind HIGH. Description. Cosine function in radians. Class. Elemental function. Argument. X must be of type real or complex. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to cos(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. Examples. COS(1.0) has the value 0.54030231. COS((1.0_HIGH, 1.0)) has the value 0.83373002513115 - 0.98889770576287i with kind HIGH. Description. Cosine function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to cos(X). Examples. COSD(0.0) has the value 1.0. COSD(60.0) has the value 0.5. Description. Hyperbolic cosine function. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to cosh(X). Examples. COSH(1.0) has the value 1.5430806. COSH(0.1_HIGH) has the value 1.0050041680558 with kind HIGH. Description. Count the number of .TRUE. elements of MASK along dimension DIM. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of type default integer. It is scalar if DIM is absent or MASK 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 MASK. Result Value.
Examples.
Description. Perform a circular shift on an array expression of rank one, or perform circular shifts on all the complete rank one sections along a given dimension of an array expression of rank two or greater. Elements shifted out at one end of a section are shifted in at the other end. Different sections may be shifted by different amounts and in different directions (positive for left shifts, negative for right shifts). Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of the type and type parameters of ARRAY, and has the shape of ARRAY. Result Value.
Examples.
Description. Return current system date. Class. Nonstandard subroutine. Argument. DATESTR must be of type character. It must be a character string of length 9 or more. Example. The following program gets and prints the current system date. Its output could be, for example, "12-Jul-96" (without the quotes).
Optional Arguments. DATE, TIME, ZONE, VALUES Description. Returns data on the real-time clock and date in a form compatible with the representations defined in ISO 8601:1988 ("Data elements and interchange formats — Information interchange — Representation of dates and times"). Class. Subroutine. Arguments.
Example.
if called in Geneva, Switzerland on 1985 April 12 at 15:27:35.5 would have assigned the value "19850412bb" to BIG_BEN(1), the value "152735.500" to BIG_BEN(2), and the value "+0100bbbbb" to BIG_BEN(3), and the following values to DATE_TIME: 1985, 4, 12, 60, 15, 27, 35, 500. Note that UTC is defined by CCIR Recommendation 460-2 (and is also known as Greenwich Mean Time). Description. Convert to double precision real type. Class. Elemental function. Argument. A must be of type integer, real, or complex. Result Type and Type Parameter. Double precision real. Result Value.
Examples. DBLE(-.3) is -0.3 of type double precision real. DBLE(1.0_HIGH/3) is 0.33333333333333 of type double precision real. Description. Convert to double precision complex type. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Double precision complex. Examples. DCMPLX(56) is (56.0, 0.0) of type double precision complex. The following code:
Produces this output:
Description. Convert to double precision type. Class. Elemental nonstandard function. Argument. A must be of type integer. Result Type and Type Parameter. Double precision. Example. DFLOAT(56) is 56.0 of type double precision. Description. Returns the number of significant digits in the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type integer or real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. The result has the value q if X is of type integer and p if X is of type real, where q and p are as defined in “Data representation models” for the model representing numbers of the same type and kind type parameter as X. Example. DIGITS(X) has the value 24 for real X whose model is described in “The real number system model”. Description. The difference X-Y if it is positive; otherwise zero. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. The value of the result is X-Y if X > Y and zero otherwise. Examples. DIM(5, 3) has the value 2. DIM(-3.0, 2.0) has the value 0.0. Description. Convert to double precision. Class. Elemental nonstandard function. Argument. I must be of type character. Result Type. Double precision. Examples. DNUM("3.14159") is 3.14159 of type double precision. The following code sets x to 311.0:
Description. Performs dot-product multiplication of numeric or logical vectors. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is scalar. If the arguments are of numeric type, the type and kind type parameter of the result are those of the expression VECTOR_A * VECTOR_B determined by the types of the arguments. If the arguments are of type logical, the result is of type logical with the kind type parameter of the expression VECTOR_A .AND. VECTOR_B. Result Value.
Examples.
Description. Double precision real product. Class. Elemental function. Arguments.
Result Type and Type Parameters. Double precision real. Result Value. The result has a value equal to a processor-dependent approximation to the product of X and Y. Example. DPROD(-3.0, 2.0) has the value -6.0 of type double precision real. Description. Convert to double precision. Class. Elemental nonstandard function. Argument. A must be of type integer, real, or complex. Result. Double precision. Examples. DREAL(91) is 91.0 of type double precision. The following code sets x to 45.34:
Optional Arguments. BOUNDARY, DIM Description. Perform an end-off shift on an array expression of rank one or perform end-off shifts on all the complete rank-one sections along a given dimension of an array expression of rank two or greater. Elements are shifted off at one end of a section and copies of a boundary value are shifted in at the other end. Different sections may have different boundary values and may be shifted by different amounts and in different directions (positive for left shifts, negative for right shifts). Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result has the type, type parameters, and shape of ARRAY. Result Value. 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). Examples.
Description. 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. Class. Inquiry function. Argument. X must be of type real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Scalar of the same type and kind type parameter as X. Result Value. 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. Examples. EPSILON(X) has the value 2-23 for real X whose model is described in “The real number system model”. EPSILON(Y), where Y has kind parameter HIGH, would be 2-47 if p is 48 for the model of kind HIGH. Description. Close all files and terminate the program. Class. Nonstandard subroutine. Argument. 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 Example. The following program exits before the second PRINT statement.
This program produces the following output:
The return code is saved in the $status or $? environment variable; it is not printed. Description. Exponential. Class. Elemental function. Argument. X must be of type real or complex. Result Type and Type Parameter. Same as X. Result Value. 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. Examples. EXP(1.0) has the value 2.7182818. EXP(2.0_HIGH/3.0) has the value 1.9477340410547 with kind HIGH. Description. Returns the exponent part of the argument when represented as a model number. Class. Elemental function. Argument. X must be of type real. Result Type. Default integer. Result Value. 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. Examples. EXPONENT(1.0) has the value 1 and EXPONENT(4.1) has the value 3 for reals, whose model is described in “The real number system model”. Description. Returns the greatest integer less than or equal to its argument. Class. Elemental function. Argument. A must be of type real. Result Type and Type Parameter. Default integer. Result Value. 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. Examples. FLOOR(3.7) has the value 3. FLOOR(-3.7) has the value -4. FLOOR(10.0_HIGH/3) has the value 3. Description. Flush pending I/O on a logical unit. Class. Nonstandard subroutine. For details see FLUSH in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Get an operating system file descriptor. Class. Inquiry nonstandard function. For details see FNUM in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Returns the fractional part of the model representation of the argument value. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. 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. Example. FRACTION(3.0) has the value 0.75 for reals, whose model is described in “The real number system model”. Description. Free a block of memory. Class. Nonstandard subroutine. For details see FREE in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Attach a system file descriptor to a logical unit. Class. Nonstandard subroutine. For details see FSET in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Retrieve a C language FILE stream pointer. Class. Inquiry nonstandard function. For details see FSTREAM in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Get the arguments passed to the program. Class. Nonstandard subroutine. Arguments.
Example. The following code assigns arg the value of the first argument passed to the program.
Description. Return the value of a system environment variable. Class. Nonstandard subroutine. Arguments. 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. Example. The following code assigns val the value of the TERM environment variable.
Description. Generate Gaussian normal random numbers. Class. Elemental nonstandard function. Result. 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. Examples. y=GRAN() assigns the REAL(4) scalar y a random value. For a REAL(4) array x, x=GRAN() sets all elements of x to the same random value; a separate call to GRAN to assign each element would provide different values. Description. Convert to INTEGER(2) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, double precision, or complex. Result. INTEGER(2) type. Examples. HFIX(9.897) is 9 of type INTEGER(2). HFIX(9.125) is 9 of type INTEGER(2). The following code sets b to 34:
Description. Returns the largest number in the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type integer or real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Scalar of the same type and kind type parameter as X. Result Value. 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”. Example. HUGE(X) has the value (1 - 2-24) * 2127 for real X, whose model is described in “The real number system model”. Description. Returns the position of a character in the ASCII collating sequence. Class. Elemental function. Argument. C must be of type default character and of length one. Result Type and Type Parameter. Default integer. Result Value. 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. Examples. IACHAR('X') has the value 88. IACHAR('*') has the value 42. Description. Return the address of X. Class. Inquiry nonstandard function. Argument. X may be of any type. Result Type. The result is of type default integer. See “BADDRESS(X)” for examples. Description. Performs a bitwise logical AND. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. The result has the value obtained by combining I and J bit-by-bit according to the following truth table:
The model for the interpretation of an integer value as a sequence of bits is in “The bit model”. Examples. IAND(1, 3) has the value 1. IAND(2_SHORT, 10_SHORT) is 2 with kind SHORT. Description. Get the number of arguments passed to the program. Class. Elemental nonstandard function. Result Type. Integer. Result Value. 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. Example. The statement PRINT *,IARGC() prints a count of the arguments passed to the program. Description. Clears a bit to zero. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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”. Examples. IBCLR(14, 1) has the result 12. If V has the value (1, 2, 3, 4), the value of IBCLR(POS = V, I = 31) is [29, 27, 23, 15]. The value of IBCLR((/ 15_SHORT, 31_SHORT, 7_SHORT /), 3) is [7, 23, 7] with kind SHORT. Description. Extracts a sequence of bits. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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”. Examples. IBITS(14, 1, 3) has the value 7. The value of IBITS((/ 15_SHORT, 31_SHORT, 7_SHORT /), 2_SHORT, 3_SHORT) is [3, 7, 1] with kind SHORT. Description. Sets a bit to one. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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”. Examples. IBSET(12, 1) has the value 14. If V has the value [1, 2, 3, 4], the value of IBSET(POS = V, I = 0) is [2, 4, 8, 16]. The value of IBSET((/ 15_SHORT, 31_SHORT, 7_SHORT /), 3) is [15, 31, 15] with kind SHORT. Description. Returns the position of a character in the processor collating sequence associated with the kind type parameter of the character. Class. Elemental function. Argument. C must be of type character and of length one. Its value must be that of a character capable of representation in the processor. Result Type and Type Parameter. Default integer. Result Value. 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.. ICHAR('X') has the value 88 on a processor using the ASCII collating sequence for the default character type. ICHAR('*') has the value 42 on such a processor. Description. Return the month, day, and year of current system. Class. Nonstandard subroutine. Arguments. MONTH, DAY, and YEAR must be of type integer. Example. The statement CALL IDATE(mon,da,yr) sets mon to the month number, da to the day of the month, and yr to the two-digit year representation (for example, 69 for the year 1969). Description. Integer positive difference. Class. Nonstandard function. Arguments.
Result Type and Type Parameter. Integer of same kind type parameter as X. Result Value. If X > Y, IDIM(X, Y) is X-Y. If X <= Y, IDIM(X, Y) is zero. Examples. IDIM(89, 12) is 77. IDIM(56, 59) is 0. Description. Performs a bitwise exclusive OR. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. The result has the value obtained by combining I and J bit-by-bit according to the following truth table:
The model for the interpretation of an integer value as a sequence of bits is in “The bit model”. Examples. IEOR(1, 3) has the value 2. IEOR( (/ 3_SHORT, 10_SHORT /), 2_SHORT) is [1, 8] with kind SHORT. Description. Get command-line argument. Class. Inquiry nonstandard function. Arguments.
Result Value. 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. Example. The following code copies the first six characters of the second command-line argument to the character variable str.
Description. Convert to INTEGER(2) type. Class. Elemental nonstandard function. Argument. A must be of type INTEGER(4). Result. INTEGER(2) type. Example. IJINT(32) is 32 of type INTEGER(2). Description. Imaginary part of complex number. Class. Elemental nonstandard function. Argument. A must be of type complex or double complex. Result. Real if A is complex. Double precision if A is double complex. Example. The following code sets x to 2.0:
Description. Returns the starting position of a substring within a string. Class. Elemental function. Arguments.
Result Type and Type Parameter. Default integer. Result Value.
Examples. INDEX('FORTRAN', 'R') has the value 3. INDEX('FORTRAN', 'R', BACK = .TRUE.) has the value 5. INDEX("XXX", "") has the value 1. INDEX("XXX", "", BACK=.TRUE.) has the value 4. Description. Convert to integer type. Class. Elemental function. Arguments.
Result Type and Type Parameter. 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. Result Value.
Examples. INT(-3.7) has the value -3. INT(9.1_HIGH/4.0_HIGH, SHORT) is 2 with kind SHORT. Description. Convert to INTEGER(1) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, or complex. Result. INTEGER(1) type. If A is complex, INT1(A) is equal to the truncated real portion of A. Example. INT1(6.23) is 6 of type INTEGER(1). Description. Convert to INTEGER(2) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, or complex. Result. INTEGER(2) type. If A is complex, INT2(A) is equal to the truncated real portion of A. Example. INT2(212.4545) is 212 of type INTEGER(2). Description. Convert to INTEGER(4) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, or complex. Result. INTEGER(4) type. If A is complex, INT4(A) is equal to the truncated real portion of A. Example. INT4(1988.74) is 1988 of type INTEGER(4). Description. Convert to INTEGER(8) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, or complex. Result. INTEGER(8) type. If A is complex, INT8(A) is equal to the truncated real portion of A. Example. INT8(14.14) is 14 of type INTEGER(8). Description. Convert character to INTEGER(2) type. Class. Elemental nonstandard function. Argument. I must be of type character. Result. INTEGER(2) type. Example. INUM("451.92") is 451 of type INTEGER(2). Description. Print the text for an I/O message. Class. Nonstandard subroutine. For details see IOMSG in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Performs a bitwise inclusive OR. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. The result has the value obtained by combining I and J bit-by-bit according to the following truth table:
The model for the interpretation of an integer value as a sequence of bits is in “The bit model”. Examples. IOR(1, 3) has the value 3. IOR( (/ 3_SHORT, 2_SHORT /),(/ 1_SHORT, 10_SHORT /) ) is [3_SHORT, 10_SHORT]. Description. Convert to integer type. Class. Elemental nonstandard function. Argument. A must be of type REAL(16). Result. Integer type. Examples. IQINT(9416.39) is 9416. Description. Generate pseudorandom numbers. Class. Elemental nonstandard function. Result Type and Type Parameter. INTEGER(4) type. Result Value. IRAND generates numbers in the range 0 through 215-1. Example.
Notes. For details about restarting the pseudorandom number generator used by IRAND and RAND, see “SRAND(ISEED)”. Description. Generate Poisson-distributed random numbers. Class. Elemental nonstandard function. Argument. 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). Result Type and Type Parameter. INTEGER(4) type. Result Value. 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. Example.
Description. Performs a logical shift. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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 in “The bit model”. Examples. ISHFT(3, 1) has the value 6. ISHFT(3, -1) has the value 1. Description. Performs a circular shift of the rightmost bits. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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 in “The bit model”. Example. ISHFTC(3, 2, 3) has the value 5. Description. Absolute value of A times the sign of B. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as A. Result Value. The value of the result is |A| if B>= 0 and -|A| if B < 0. Examples. ISIGN(-3, 0) is 3. ISIGN(12, -9) is -12. Description. Determine if a value is NaN (not a number). Class. Elemental nonstandard function. Argument. X must be of type real. Result Type. Logical. Examples. ISNAN(45.4) is .FALSE.. ISNAN(ACOSH(0.0)) is .TRUE.. Description. Exclusive OR. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. The result has the value obtained by performing an exclusive OR on I and J bit-by-bit according to the truth table that follows.
The model for interpreting an integer value as a sequence of bits is in “The bit model”. Example. IXOR(12, 7) is 11. (Binary 1100 exclusive OR with binary 0111 is binary 1011.) Description. Zero extend. Class. Generic elemental nonstandard function. Argument.
Result Type and Type Parameter. The result is of type INTEGER(2). Result. IZEXT converts A to INTEGER(2) by sign-extending zeroes instead of the actual sign bit. Description. Convert character to integer type. Class. Elemental nonstandard function. Argument. I must be of type character. Result. Integer type. Example. JNUM("46616.725") is 46616. Description. Zero extend. Class. Generic elemental nonstandard function. Argument.
Result Type and Type Parameter. The result is of type INTEGER(4). Result. IZEXT converts A to INTEGER(4) by sign-extending zeroes instead of the actual sign bit. Description. Returns the value of the kind type parameter of X. Class. Inquiry function. Argument. X may be of any intrinsic type. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. The result has a value equal to the kind type parameter value of X. Examples. KIND(0.0) has the kind type parameter value of default real. KIND(1.0_HIGH) has the value of the named constant HIGH. Description. Zero extend. Class. Generic elemental nonstandard function. Argument.
Result Type and Type Parameter. The result is of type INTEGER(8). Result. IZEXT converts A to INTEGER(8) by sign-extending zeroes instead of the actual sign bit. Description. Returns all the lower bounds or a specified lower bound of an array. Class. Inquiry function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples. If the following statements are processed
LBOUND(A) is [2, 7], LBOUND(A, DIM=2) is 7, LBOUND(B) is [2,7], LBOUND(C) is [1,1], and LBOUND(D) is [-3,-7]. Description. Returns the length of a character entity. Class. Inquiry function. Argument. STRING must be of type character. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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. Example. If C and D are declared by the statements
LEN(C) has the value 11, and LEN(D) has the value 31. Description. Returns the length of the character argument without counting trailing blank characters. Class. Elemental function. Argument. STRING must be of type character. Result Type and Type Parameter. Default integer. Result Value. 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. Examples. LEN_TRIM('bAbBbb') has the value 4. LEN_TRIM('bbb') has the value 0. Description. Tests whether a string is lexically greater than or equal to another string, based on the ASCII collating sequence. Class. Elemental function. Arguments.
Result Type and Type Parameters. Default logical. Result Value. 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. Examples. LGE('apple', 'beans') has the value .FALSE.. LGE('apple', 'applesauce') has the value .FALSE.. LGE('Zebra', 'Yak') has the value .TRUE.. Description. Tests whether a string is lexically greater than another string, based on the ASCII collating sequence. Class. Elemental function. Arguments.
Result Type and Type Parameters. Default logical. Result Value. 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. Examples. LGT('apple', 'beans') has the value .FALSE.. LGT('apple', 'applesauce') has the value .FALSE.. LGT('Zebra', 'Yak') has the value .TRUE.. Description. Tests whether a string is lexically less than or equal to another string, based on the ASCII collating sequence. Class. Elemental function. Arguments.
Result Type and Type Parameters. Default logical. Result Value. 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. Examples. LLE('apple', 'beans') has the value .TRUE.. LLE('apple', 'applesauce') has the value .TRUE.. LLE('Zebra', 'Yak') has the value .FALSE.. Description. Tests whether a string is lexically less than another string, based on the ASCII collating sequence. Class. Elemental function. Arguments.
Result Type and Type Parameters. Default logical. Result Value. 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. Examples. LLT('apple', 'beans') has the value .TRUE.. LLT('apple', 'applesauce') has the value .TRUE.. LLT('Zebra', 'Yak') has the value .FALSE.. Description. Return the address of the argument. Class. Inquiry nonstandard function. For details see LOC in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Natural logarithm. Class. Elemental function. Argument. 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. Result Type and Type Parameter. Same as X. Result Value. 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. Examples. LOG(10.0) has the value 2.3025851. LOG((-0.5_HIGH,0)) has the value -0.69314718055994 + 3.1415926535898i with kind HIGH. Description. Common logarithm. Class. Elemental function. Argument. X must be of type real. The value of X must be greater than zero. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to log10X. Examples. LOG10(10.0) has the value 1.0. LOG10(10.0E1000_HIGH) has the value 1001.0 with kind HIGH. Description. Converts between kinds of logical. Class. Elemental function. Arguments.
Result Type and Type Parameter. Logical. If KIND is present, the kind type parameter is that specified by KIND; otherwise, the kind type parameter is that of default logical. Result Value. The value is that of L. Examples. LOGICAL(L .OR. .NOT. L) has the value .TRUE. and is of type default logical, regardless of the kind type parameter of the logical variable L. LOGICAL(L, BIT) has kind parameter BIT and has the same value as L. Description. Left shift. Class. Elemental nonstandard function. For details see LSHFT in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Left shift. Class. Elemental nonstandard function. For details see LSHIFT in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Allocate a block of memory. Class. Transformational nonstandard function. For details see MALLOC in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Performs matrix multiplication of numeric or logical matrices. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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:
Result Value.
Examples. If A is the matrix
and B is the matrix
and X is the vector [1, 2] and Y is the vector [1, 2, 3].
Description. Maximum value. Class. Elemental function. Arguments. The arguments must all have the same type which must be integer or real, and they must all have the same kind type parameter. Result Type and Type Parameter. Same as the arguments. Result Value. The value of the result is that of the largest argument. Examples. MAX(-9.0, 7.0, 2.0) has the value 7.0. MAX(-1.0_HIGH/3, -0.1_HIGH) is -0.1_HIGH. Description. Returns the maximum exponent in the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. The result has the value emax, as defined in “The real number system model”. Example. MAXEXPONENT(X) has the value 128 for real X, whose model is described in “The real number system model”. Description. Returns the location of the first element of ARRAY having the maximum value of the elements identified by MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of type default integer; it is an array of rank one and of size equal to the rank of ARRAY. Result Value.
In both cases, an element of the result is undefined if the processor cannot represent the value as a default integer. Examples.
Description. Maximum value of the elements of ARRAY along dimension DIM that correspond to the .TRUE. elements of MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples.
Description. Return time accounting for a program. Class. Inquiry nonstandard function. Result Type. Integer. Result Value. 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. Description. Choose alternative value according to the value of a mask. Class. Elemental function. Arguments.
Result Type and Type Parameters. Same as TSOURCE. Result Value. The result is TSOURCE if MASK is .TRUE. and FSOURCE otherwise. Examples. If TSOURCE is the array
and FSOURCE is the array
and MASK is the array
then where "T" represents .TRUE. and "." represents .FALSE., then MERGE(TSOURCE, FSOURCE, MASK) is
The value of MERGE(1.0, 0.0, K > 0) is 1.0 for K = 5 and 0.0 for K = -2. Description. Minimum value. Class. Elemental function. Arguments. 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. Result Type and Type Parameter. Same as the arguments. Result Value. The value of the result is that of the smallest argument. Examples. MIN(-9.0, 7.0, 2.0) has the value -9.0. MIN(-0.4_HIGH, -1.0_HIGH/3) is -0.4_HIGH. Description. Returns the minimum exponent in the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. The result has the value emin, as defined in “The real number system model”. Example. MINEXPONENT(X) has the value -125 for real X, whose model is described in “The real number system model”. Description. Returns the location of the first element of ARRAY having the minimum value of the elements identified by MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of type default integer; it is an array of rank one and of size equal to the rank of ARRAY. Result Value.
In both cases, an element of the result is undefined if the processor cannot represent the value as a default integer. Examples.
Description. Minimum value of all the elements of ARRAY along dimension DIM corresponding to .TRUE. elements of MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples.
Description. Remainder function. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as A. Result Value. If P is not 0, the value of the result is A - INT(A/P) * P. If P=0, the result is processor-dependent. Examples. MOD(3.0, 2.0) has the value 1.0. MOD(8, 5) has the value 3. MOD(-8, 5) has the value -3. MOD(8, -5) has the value 3. MOD(-8, -5) has the value -3. MOD(2.0_HIGH, 3.0_HIGH) has the value 2.0_HIGH. Description. Modulo function. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as A. Result Value.
Examples. MODULO(8, 5) has the value 3. MODULO(-8, 5) has the value 2. MODULO(8, -5) has the value -2. MODULO(-8, -5) has the value -3. MODULO(3.0, 2.0) has the value 1.0. MODULO(2.0_HIGH, 3.0_HIGH) has the value 2.0_HIGH. Description. Copies a sequence of bits from one data object to another. Class. Elemental subroutine. Arguments.
Examples. If TO has the initial value 6, the value of TO after the statement CALL MVBITS(7, 2, 2, TO, 0) is 5. After the statement
is executed, the integer variable PATTERN of kind SHORT has a leading bit that is identical to its terminal bit. Description. Returns the nearest different machine representable number in a given direction. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. 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. Example. NEAREST(3.0, 2.0) has the value 3+2-22 on a machine whose representation is that of the model described in “The real number system model”. Description. Nearest integer. Class. Elemental function. Arguments.
Result Type and Type Parameter. 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. Result Value. 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. Examples. NINT(2.783) has the value 3. NINT(-1.99999999999_HIGH) has the value -2. Description. Performs a bitwise logical complement. Class. Elemental function. Argument. I must be of type integer. Result Type and Type Parameter. Same as I. Result Value. 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 in “The bit model”. Example. If I is an integer of kind SHORT and has a value that is equal to 01010101 (base 2), NOT(I) has a value that is equal to 10101010 (base 2). Description. Bitwise logical OR. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as I. Result Value. 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 in “The bit model”. Example. OR(3, 5) is 7. (Binary 0011 OR with binary 0101 is binary 0111.) Description. Pack an array into an array of rank one under the control of a mask. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value. 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. Examples. The nonzero elements of an array M with the value
may be "gathered" by the function PACK. The result of PACK(M, MASK = M .NE. 0) is [9, 7]. The result of PACK(M, M .NE. 0, VECTOR = (/ 2, 4, 6, 8, 10, 12 /)) is [9, 7, 6, 8, 10, 12]. Description. Returns the decimal precision in the model representing real numbers with the same kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type real or complex. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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. Example. PRECISION(X) has the value INT(23 * LOG10(2.)) = INT(6.92...) = 6 for real X whose model is described in “The real number system model”. Description. Determine whether an optional argument is present. Class. Inquiry function. Argument. A must be the name of an optional dummy argument that is accessible in the procedure in which the PRESENT function reference appears. Result Type and Type Parameters. Default logical scalar. Result Value. The result has the value .TRUE. if A is present and otherwise has the value .FALSE.. Example.
If SUB is called with the statement
then C is set to 30.0. If SUB is called with the statement
then C is set to 15.0. An optional argument that is not present must not be referenced or defined or supplied as a nonoptional actual argument, except as the argument of the PRESENT intrinsic function. Description. Product of all the elements of ARRAY along dimension DIM corresponding to the .TRUE. elements of MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples.
Description. Convert to REAL(16) type. Class. Elemental nonstandard function. Argument. A must be of type integer, real, double precision, or complex. Result. REAL(16). Examples. QEXT(77) is 77.0 of type REAL(16). The following code sets x to 34.4:
Description. Convert to REAL(16) type. Class. Elemental nonstandard function. Argument. A must be of type integer or REAL(4). Result. REAL(16). Examples. QFLOAT(4) is 4.0 of type REAL(16). QFLOAT(1.6723) is 1.6723 of type REAL(16). Description. Convert character to REAL(16) type. Class. Elemental nonstandard function. Argument. I must be of type character. Result. REAL(16) type. Example. QNUM("8899.321") is 8899.321 of type REAL(16). Description. Double precision product. Class. Elemental nonstandard function. Arguments. X and Y must be of type double precision. Result. REAL(16) type. Example. The following code prints the product of x and y (11392147076.9423828125).
Description. Returns the base of the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type integer or real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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”. Example. RADIX(X) has the value 2 for real X whose model is described in “The real number system model”. Description. Multiplicative congruential random number generator. Class. Elemental nonstandard function. Argument. 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. Result Type and Type Parameter. REAL(4) type. Example.
Notes. 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). Description. Generate successive pseudorandom numbers uniformly distributed in the range of 0.0 to 1.0. Class. Elemental nonstandard function. Result Type and Type Parameter. REAL(4) type. Example.
Notes. For details about restarting the pseudorandom number generator used by IRAND and RAND, see “SRAND(ISEED)” section. Description. Returns one pseudorandom number or an array of pseudorandom numbers from the uniform distribution over the range 0 <= x < 1. Class. Subroutine. Argument. 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. Examples.
Optional Arguments. SIZE, PUT, GET Description. Restarts or queries the pseudorandom number generator used by RANDOM_NUMBER. Class. Subroutine. Arguments. There must either be exactly one or no arguments present.
Examples.
Description. Returns the decimal exponent range in the model representing integer or real numbers with the same kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type integer, real, or complex. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value.
Example. 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. Description. Convert to real type. Class. Elemental function. Arguments.
Result Type and Type Parameter. Real.
Result Value.
Examples. REAL(-3) has the value -3.0. REAL(Z) has the same kind type parameter and the same value as the real part of the complex variable Z. REAL(2.0_HIGH/3.0) is 0.66666666666666 with kind HIGH. Description. Concatenate several copies of a string. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. Character scalar of length NCOPIES times that of STRING, with the same kind type parameter as STRING. Result Value. The value of the result is the concatenation of NCOPIES copies of STRING. Examples. REPEAT('H', 2) has the value HH. REPEAT('XYZ', 0) has the value of a zero-length string. Optional Arguments. PAD, ORDER Description. Constructs an array of a specified shape from the elements of a given array. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value. 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. Examples. RESHAPE((/ 1, 2, 3, 4, 5, 6 /), (/ 2, 3 /)) has the value
RESHAPE((/ 1, 2, 3, 4, 5, 6 /), (/ 2, 4 /), (/ 0, 0 /), (/ 2, 1 /)) has the value
Description. Convert character to real type. Class. Elemental nonstandard function. Argument. I must be of type character. Result. Default real type. Example. RNUM("821.003") is 821.003 of type default real. Description. Returns the reciprocal of the relative spacing of model numbers near the argument value. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has the value |X * b-e| * bp, where b, e, and p are as defined in “The real number system model”. Example. RRSPACING(-3.0) has the value 0.75 * 224 for reals whose model is described in “The real number system model”. Description. Bitwise right shift. Class. Elemental nonstandard function. For details see RSHFT in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Bitwise right shift. Class. Elemental nonstandard function. For details see RSHIFT in Table 11-6 “ Generic and specific intrinsic procedures”. Description. Returns X * b I where b is the base in the model representation of X (see “The real number system model”). Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. 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. Example. SCALE(3.0, 2) has the value 12.0 for reals whose model is described in “The real number system model”. Description. Scan a string for any one of the characters in a set of characters. Class. Elemental function. Arguments.
Result Type and Type Parameter. Default integer. Result Value.
Examples.
Description. Return the number of seconds that have elapsed since midnight, less the value of the argument. Class. Elemental nonstandard function. Argument. X must be of type REAL(4). Result Type and Type Parameter. REAL(4). Example.
Notes. 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. Description. Returns a value of the kind type parameter of an integer data type that represents all integer values n with -10R < n < 10R. Class. Transformational function. Argument. R must be scalar and of type integer. Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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. Example. SELECTED_INT_KIND(6) has the value KIND(0) on a machine that supports a default integer representation method with r=2 and q=31 as defined in the model for the integer number systems in “The integer number system model”. Description. 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. Class. Transformational function. Arguments. At least one argument must be present.
Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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. Example. SELECTED_REAL_KIND(6, 70) has the value KIND(0.0) on a machine that supports a default real approximation method with p=16, p= 6, emin=-64, and emax=63 as defined in the model for the real number system in “The real number system model”. Description. Returns the model number whose fractional part is the fractional part of the model representation of X and whose exponent part is I. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as X. Result Value. 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. Example. SET_EXPONENT(3.0, 1) has the value 1.5 for reals whose model is as described in “The real number system model”. Description. Returns the shape of an array or a scalar. Class. Inquiry function. Argument. 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. Result Type, Type Parameter, and Shape. The result is a default integer array of rank one whose size is equal to the rank of SOURCE. Result Value. The value of the result is the shape of SOURCE. Examples. The value of SHAPE(A(2:5, -1:1) ) is [4, 3]. The value of SHAPE(3) is the rank-one array of size zero. Description. Absolute value of A times the sign of B. Class. Elemental function. Arguments.
Result Type and Type Parameter. Same as A. Result Value. The value of the result is |A| if B>= 0 and -|A| if B < 0. Example. SIGN(-3.0, 2.0) has the value 3.0. Description. Sine function in radians. Class. Elemental function. Argument. X must be of type real or complex. Result Type and Type Parameter. Same as X. Result Value. 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. Examples. SIN(1.0) has the value 0.84147098. SIN((0.5_HIGH, 0.5)) has the value 0.54061268571316 + 0.45730415318425i with kind HIGH. Description. Sine function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to sin(X). Examples. SIND(0.0) has the value 0.0. SIND(30.0) has the value 0.5. Description. Hyperbolic sine function. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to sinh(X). Examples. SINH(1.0) has the value 1.1752012. SINH(0.5_HIGH) has the value 0.52109530549375 with kind HIGH. Description. Returns the extent of an array along a specified dimension or the total number of elements in the array. Class. Inquiry function. Arguments.
Result Type, Type Parameter, and Shape. Default integer scalar. Result Value. 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. Examples. The value of SIZE(A(2:5, -1:1), DIM=2) is 3. The value of SIZE(A(2:5, -1:1) ) is 12. Description. Return the number of bytes of storage used by the argument. Class. Inquiry nonstandard function. Argument. A may be of any type (except assumed-size arrays or passed-length character arguments). Result Type. Integer. Example.
This code produces the following output: 2 40 16. Description. Returns the absolute spacing of model numbers near the argument value. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. 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). Example. SPACING(3.0) has the value 2-22 for reals whose model is described in “The real number system model”. Description. 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. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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.
Result Value.
Examples.
Description. Square root. Class. Elemental function. Argument. X must be of type real or complex. If X is real, its value must be greater than or equal to zero. Result Type and Type Parameter. Same as X. Result Value. 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. Examples. SQRT(4.0) has the value 2.0. SQRT(5.0_HIGH) has the value 2.23606774998 with kind HIGH. Description. Restart the pseudorandom number generator used by IRAND and RAND. Class. Elemental nonstandard subroutine. Argument. 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. Example.
Description. Sum all the elements of ARRAY along dimension DIM corresponding to the .TRUE. elements of MASK. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples.
Description. Issue a shell command from a Fortran 90 program. Class. Nonstandard subroutine. Argument. 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. Example. CALL SYSTEM("pwd") prints the working directory from within a Fortran 90 program. Optional Arguments. COUNT, COUNT_RATE, COUNT_MAX Description. Returns integer data from a real-time clock. Class. Subroutine. Arguments.
Example. If the processor clock is a 24-hour clock that registers time in 1-second intervals, at 11:30 A.M. the reference
sets C = 11 * 3600 + 30 * 60 = 41400, R = 1, and M = 24 * 3600 - 1 = 86399. Description. Tangent function in radians. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to tan(X), with X regarded as a value in radians. Examples. TAN(1.0) has the value 1.5574077. TAN(2.0_HIGH) has the value -2.1850398632615 with kind HIGH. Description. Tangent function in degrees. Class. Elemental nonstandard function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to tan(X). Examples. TAND(0.0) has the value 0.0. TAND(45.0) has the value 1.0. TAND(135.0) has the value -1.0. Description. Hyperbolic tangent function. Class. Elemental function. Argument. X must be of type real. Result Type and Type Parameter. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to tanh(X). Examples. TANH(1.0) has the value 0.76159416. TANH(2.0_HIGH) has the value 0.96402758007582 with kind HIGH. Description. Return the current system time. Class. Nonstandard subroutine. Argument. 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). Example. The following code sets the character variable tstr to the current system time (for example, "16:20:07", without the quotation marks).
Description. Returns the smallest positive number in the model representing numbers of the same type and kind type parameter as the argument. Class. Inquiry function. Argument. X must be of type real. It may be scalar or array valued. Result Type, Type Parameter, and Shape. Scalar with the same type and kind type parameter as X. Result Value. The result has the value bemin-1 where b and emin are as defined in “The real number system model”. Example. TINY(X) has the value 2-127 for real X, whose model is described in “The real number system model”. Description. Returns a result with a physical representation identical to that of SOURCE but interpreted with the type and type parameters of MOLD. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is of the same type and type parameters as MOLD.
Result Value. 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. Examples.
Description. Transpose an array of rank two. Class. Transformational function. Argument. MATRIX may be of any type and must have rank two. Result Type,Type Parameters, and Shape. 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. Result Value. Element (i, j) of the result has the value MATRIX(j, i), i= 1, 2, ..., n; j= 1, 2, ..., m. Example. If A is the array
then TRANSPOSE(A) has the value
Description. Returns the argument with trailing blank characters removed. Class. Transformational function. Argument. STRING must be of type character and must be a scalar. Result Type and Type Parameters. 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. Result Value. 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. Example. TRIM('bAbBbb') is 'bAbB'. Description. Returns all the upper bounds of an array or a specified upper bound. Class. Inquiry function. Arguments.
Result Type, Type Parameter, and Shape. 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. Result Value.
Examples. If the following statements are processed
then
Description. Unpack an array of rank one into an array under the control of a mask. Class. Transformational function. Arguments.
Result Type, Type Parameter, and Shape. The result is an array of the same type and type parameters as VECTOR and the same shape as MASK. Result Value. 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. Examples. Specific values may be "scattered" to specific positions in an array by using UNPACK. If M is the array
then V is the array [1, 2, 3], and Q is the logical mask
where "T" represents .TRUE. and "." represents .FALSE., then the result of UNPACK(V, MASK = Q, FIELD = M) has the value
and the result of UNPACK(V, MASK = Q, FIELD = 0) has the value
Optional Argument. BACK Description. 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. Class. Elemental function. Arguments.
Result Type and Type Parameter. Default integer. Result Value.
Examples.
Description. Bitwise exclusive OR. Class. Elemental nonstandard function. Arguments.
Result Type and Type Parameter. Same as I. Notes. See “IXOR(I, J)” for result value information and examples. Description. Zero extend. Class. Elemental nonstandard function. Argument. A must be of type integer or logical. Result. 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. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||