## 3.3.2 Octal Constants

An octal constant is an alternative way to represent numeric constants. An octal constant takes one of the following forms:

  O'd[d...]'
  O"d[d...]"
  d
  Is an octal (base 8) digit (0 through 7).

You can specify up to 256 bits in octal (86 octal digits) constants. Leading zeros are ignored.

Examples

The following examples demonstrate valid and invalid octal constants:

Valid |
`O'07737'` |
`O"1"` |
Invalid | Explanation
`O'7782'` | The character 8 is invalid.
`O7772'` | No apostrophe after the O.
`"0737"` | No O before the first quotation mark.

For More Information:

For details on an alternative form for octal constants, see Section B.7.

Previous Page Next Page Table of Contents