Top: f77 Up: 8,4 - Constants
Previous: 8,4 - Constants Next: 8,4,2 - Character
Section 8,4,1: Bit
A bit constant is a binary, octal, or hexadecimal constant. You
can use this type of constant wherever numeric constants are
allowed and it assumes a numeric data type according to its
context.
A binary constant has the form:
'c1c2c3...cn'B c is a 0 or 1
An octal constant has the form:
'c1c2c3...cn'O c is a digit in the range 0 - 7
A hexadecimal constant has the form:
'c1c2c3...cn'X c is a digit in the range 0 - 9, or a letter
or in the range A - F, or a - f
'c1c2c3...cn'Z
Bit constants are "typeless" numeric constants. They assume data
types based on their usage, according to the following rules:
o When the constant is used with a binary operator, including the
assignment operator, the data type of the constant is the data
type of the other operand.
o When a specific data type is required, that type is assumed for
the constant.
o When the constant is used as an actual argument, if the bit
constant is greater than 4 bytes, INTEGER*8 is assumed;
otherwise, INTEGER*4 is assumed.
o When the constant is used in any other context, an INTEGER*4
data type is assumed (unless the -noi4 or -i8 (AXP only)
compiler option specifies otherwise).
Top: f77 Up: 8,4 - Constants
Previous: 8,4 - Constants Next: 8,4,2 - Character