Packed Decimal Literals

i5/OS C A packed decimal literal is a kind of floating-point literal that provides the ability to accurately represent large numeric quantities. It can consist of an integral part, a decimal point, a fractional part, and the mandatory suffix D. A packed decimal literal can have up to sixty-three significant digits, including integral and fractional parts.

A packed decimal literal is of the form:

Read syntax diagramSkip visual syntax diagram     .-----------.     .-------.
     V           |     V       |
>>-----+-------+-+--.----digit-+----+-d-+----------------------><
       '-digit-'                    '-D-'
 

Both the integral and fractional parts are made up of decimal digits. You can omit either the integral part or the fractional part, but not both.

Related References



[ Top of Page | Previous Page | Next Page | Contents | Index ]