Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-4580829C-C06C-46D1-BDD5-86B86DB852C4
Visible to Intel only — GUID: GUID-4580829C-C06C-46D1-BDD5-86B86DB852C4
SHORT
Portability Function: Converts an INTEGER(4) argument to INTEGER(2) type.
USE IFPORT
result = SHORT (int4)
int4 |
(Input) INTEGER(4). Value to be converted. |
The result type is INTEGER(2). The result is equal to the lower 16 bits of int4. If the int4 value is greater than 32,767, the converted INTEGER(2) value is not equal to the original.
USE IFPORT INTEGER(4) this_one INTEGER(2) that_one READ(*,*) this_one THAT_ONE = SHORT(THIS_ONE) WRITE(*,10) THIS_ONE, THAT_ONE 10 FORMAT (X," Long integer: ", I16, " Short integer: ", I16) END