Portability Function: Converts an INTEGER(4) value into an equivalent INTEGER(2) type.
Module: USE DFPORT
Syntax
Results:
The result is of type 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.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: INT, TYPE, Portability Library
Example
USE DFPORT
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