XL Fortran for AIX 8.1
Language Reference
Convert to integer type.
- A
- must be of type integer, real, or complex.
- KIND (optional)
- must be a scalar integer initialization expression.
Class
Elemental function
Result Type and Attributes
- Integer.
- If KIND is present, the kind type parameter is that specified by
KIND; otherwise, the kind type parameter is that of the default integer
type.
Result Value
- Case (i): If A is of type integer, INT (A) = A.
- Case (ii): 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.
- Case (iii): If A is of type complex, INT (A) is the value obtained
by applying the case (ii) rule to the real part of A.
- The result is undefined if it cannot be represented in the specified
integer type.
Examples
INT (-3.7) has the value -3.
Specific Name
| Argument Type
| Result Type
| Pass As Arg?
|
INT
| default real
| default integer
| no
|
IDINT
| double precision real
| default integer
| no
|
IFIX
| default real
| default integer
| no
|
IQINT (1)
| REAL(16)
| default integer
| no
|
Notes:
- IBM Extension.
Related Information
For information on alternative behavior for INT when porting
programs to XL Fortran, see the -qport compiler option in the User's Guide.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]