Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Using ordinals

Example

When using ordinals, keep in mind the following:

Table 23. Ordinal-handling built-in functions
Function Description
BINARYVALUE Converts an ordinal to a binary value
ORDINALPRED Returns the next lower value for an ordinal
ORDINALSUCC Returns the next higher value for an ordinal
ORDINALNAME Returns a character string giving an ordinal’s name

For example, in the following sample code, the first DO loop below would list, in ascending order, the members of the Color set; the second DO loop would list them in descending order. The example uses the ordinal definition from Example.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)