int

Date:

10-12-2011

NAME

INT, INT2, INT4, INT8, IINT, JINT, KINT, IDINT, IIDINT, JIDINT, KIDINT, IFIX, IIFIX, JIFIX, KIFIX, LONG, SHORT - Convert to type integer

SYNOPSIS

INT ([A=]a [,[KIND=]kind])
INT2 ([A=]a)
INT4 ([A=]a)
INT8 ([A=]a)
IINT ([A=]a)
JINT ([A=]a)
KINT ([A=]a)
IDINT ([A=]a)
IIDINT ([A=]a)
JIDINT ([A=]a)
KIDINT ([A=]a)
IFIX ([A=]a)
IIFIX ([A=]a)
JIFIX ([A=]a)
KIFIX ([A=]a)
LONG ([A=]a)
SHORT ([A=]a)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

Fortran extensions: INT2, INT4, INT8, IINT, JINT, KINT, IIDINT, JIDINT, KIDINT, IIFIX, JIFIX, KIFIX, LONG, SHORT

DESCRIPTION

INT is the generic function name. These functions truncate the argument specified and return type integer. These are elemental intrinsic functions. They accept the following arguments:

a

INT, LONG, and SHORT must be of type integer, real, or complex.

  • INT2, INT4, INT8, IINT, JINT, and KINT must be single-precision real.

  • IDINT, IIDINT, JIDINT, and KIDINT must be double-precision real.

  • IFIX, IIFIX, JIFIX, and KIFIX must be of type real.

kind

A scalar integer initialization expression. The kind type to be used for the result. If not specified, the kind type for default integer.

These functions convert specified types to type integer by truncating toward 0 (the fraction is lost). Type conversion routines assign the appropriate type to Boolean arguments without shifting or manipulating the bit patterns they represent.

NOTES

The names of these intrinsics cannot be passed as arguments.

RETURN VALUES

The return values are of type integer. The magnitude of the return value does not exceed the magnitude of the argument. The sign of the return value is the same as the sign of a.

INT, IFIX, and IDINT return an integer.

INT2, IIFIX, IINT, IIDINT, and SHORT return an INTEGER (KIND=2).

INT4, JIFIX, JINT, JIDINT, and LONG return an INTEGER(KIND=4).

INT8, KIFIX, KINT, and KIDINT return an INTEGER(KIND=8).