3.6.2 Format an Integer Number or an Enumeration


Numeric values are formatted using the following set of format characters. Upper or lower case 'D', 'H', 'O', and 'B' characters designate the radix of the result. At least one of them must be included and they cannot be intermixed.


Formatting Decimal Integers

Integers and enumerated types can be formatted as decimal numbers. For enumerations declared as a range from zero to an upper bound, the current value the same as the corresponding integer. If an enumeration is declared a s a list of symbols then the value is the position in the list.


Literal characters that may be interspersed in numeric forms. You can use these characters to include literals in the formatted result.

Note that a single decimal point may appear in an integer to display fixed point number. This is recommended in situations where exact representations of discrete values is required, such as accounting applications. The format for fixed point reals is the same as integers.




Formatting Bitwise Integers

Integers can also be formatted as hexadecimal, octal, or binary numbers.



Format a String

Format a Real Number