Accepted forms for Hollerith data are:
nH… |
’…’H |
"…"H |
nL… |
’…’L |
"…"L |
nR… |
’…’R |
"…"R |
Above, “…” is a string of characters and n is the character count.
If any character constant is in a bitwise logical expression, the expression is evaluated as Hollerith.
A Hollerith constant can have 1 to 4 characters.
Examples: Octal and hexadecimal constants.
Boolean Constant |
Internal Octal for 32-bit Word |
---|---|
0B |
00000000000 |
77740B |
00000077740 |
X"ABE" |
00000005276 |
X"-340" |
37777776300 |
X’1 2 3’ |
00000000443 |
X’FFFFFFFFFFFFFFFF’ |
37777777777 |
Examples: Octal and hexadecimal in assignment statements.
i = 1357B j = X"28FF" k = X’-5A’ |
Use of an octal or hexadecimal constant in an arithmetic expression can produce undefined results and do not generate syntax errors.