The short integer data type, `INTEGER*2`, holds a signed integer. An expression involving only objects of type `INTEGER*2` is of that type. Using this feature may have adverse performance implications, and we do not recommend it.

Generic functions return short or long integers depending on the default integer type. If a procedure is compiled with the `-i2` flag, all integer constants that fit and all variables of type `INTEGER` (no explicit size) are of type `INTEGER*2`. If the precision of an integer-valued intrinsic function is not determined by the generic function rules, one is chosen that returns the prevailing length (`INTEGER*2`) when the `-i2` compilation option is in effect. With `-i2`, the default length of `LOGICAL` quantities is 2 bytes.

Ordinary integers follow the FORTRAN rules about occupying the same space as a `REAL` variable. They are assumed to be equivalent to the C type `long` `int`, and 2-byte integers are of C type `short` `int`. These short integer and logical quantities do not obey the standard rules for storage association.

An `INTEGER*2` occupies 2 bytes.

`INTEGER*2` is aligned on 2-byte boundaries.

- © 2010, Oracle Corporation and/or its affiliates