Top: f77 Up: 8,4 - Constants
Previous: 8,4,4 - Hollerith Next: 8,4,6 - Logical
Section 8,4,5: Integer
An integer constant is a whole number with no decimal point. It
can have a leading sign and is interpreted as a decimal number. It
has the form:
snn s is an optional sign
nn is a string of decimal digits (leading
zeros are ignored)
You can use integer constants to assign values to data. The
integer data types have the following ranges:
BYTE Same range as INTEGER*1
INTEGER*1 Signed integers: -128 to 127 (-2**7 to 2**7-1)
(1 byte) Unsigned integers: 0 to 255 (2**8-1)
INTEGER*2 Signed integers: -32768 to 32767
(2 bytes) (-2**15 to 2**15-1)
Unsigned integers: 0 to 65535 (2**16-1)
INTEGER*4 Signed integers: -2147483648 to 2147483647
(4 bytes) (-2**31 to 2**31-1)
NOTE: On RISC processors, the value of
an integer constant must be within this range.
INTEGER*8 Signed integers: -9223372036854775808 to
(AXP only) 9223372036854775807 (-2**63 to 2**63-1)
(8 bytes)
NOTE: On Alpha AXP processors, the value of an
integer constant must be within this range.
Note that logical data type ranges correspond to their comparable
integer data type ranges. For example, the LOGICAL*2 range is the
same as the INTEGER*2 range.
The value of an integer constant is normally INTEGER*2, INTEGER*4,
or INTEGER*8 (AXP only). If a value is within INTEGER*2 range, it
is treated as an INTEGER*2 value; if a value is outside INTEGER*2
range, but within INTEGER*4 range, it is treated as an INTEGER*4
value, and so forth.
Top: f77 Up: 8,4 - Constants
Previous: 8,4,4 - Hollerith Next: 8,4,6 - Logical