Debugging with GDB: Fortran Intrinsics

Next: Special Fortran Commands, Previous: Fortran Operators, Up: Fortran [Contents][Index]

#### 15.4.6.3 Fortran Intrinsics

Fortran provides a large set of intrinsic procedures. GDB implements an incomplete subset of those procedures and their overloads. Some of these procedures take an optional `KIND` parameter, see Fortran Types.

`ABS(a)`

  Computes the absolute value of its argument a. Currently not supported for `Complex` arguments.

`ALLOCATE(array)`

  Returns whether array is allocated or not.

`ASSOCIATED(pointer [, target])`

  Returns the association status of the pointer pointer or, if target is present, whether pointer is associated with the target target.

`CEILING(a [, kind])`

  Computes the least integer greater than or equal to a. The optional parameter kind specifies the kind of the return type `Integer(kind)`.

`CMPLX(x [, y [, kind]])`

  Returns a complex number where x is converted to the real component. If y is present it is converted to the imaginary component. If y is not present then the imaginary component is set to `0.0` except if x itself is of `Complex` type. The optional parameter kind specifies the kind of the return type `Complex(kind)`.

`FLOOR(a [, kind])`

  Computes the greatest integer less than or equal to a. The optional parameter kind specifies the kind of the return type `Integer(kind)`.

`KIND(a)`

  Returns the kind value of the argument a, see Fortran Types.

`LBOUND(array [, dim [, kind]])`

  Returns the lower bounds of an array, or a single lower bound along the dim dimension if present. The optional parameter kind specifies the kind of the return type `Integer(kind)`.

`LOC(x)`

  Returns the address of x as an `Integer`.

`MOD(a, p)`

  Computes the remainder of the division of a by p.

`MODULO(a, p)`

  Computes the a modulo p.

`RANK(a)`

  Returns the rank of a scalar or array (scalars have rank `0`).

`SHAPE(a)`

  Returns the shape of a scalar or array (scalars have shape ‘`()`’).

`SIZE(array[, dim [, kind]])`

  Returns the extent of array along a specified dimension dim, or the total number of elements in array if dim is absent. The optional parameter kind specifies the kind of the return type `Integer(kind)`.

`UBOUND(array [, dim [, kind]])`

  Returns the upper bounds of an array, or a single upper bound along the dim dimension if present. The optional parameter kind specifies the kind of the return type `Integer(kind)`.

Next: Special Fortran Commands, Previous: Fortran Operators, Up: Fortran [Contents][Index]