%PACKED

Convert a numeric expression to packed decimal data

WSupported on Windows
USupported on Unix
VSupported on OpenVMS

 

Note

The %PACKED routine is deprecated; we recommend you use the p data type instead. See Packed and implied-packed for information on the p data type.

converted = %PACKED(expression[, precision])

Return value

converted

A converted numeric expression. The result is packed decimal data format or implied-packed decimal data format. (p)

Arguments

expression

The numeric expression to be converted. (n)

precision

(optional) The precision value for an implied-packed decimal number. (n)

Discussion

%PACKED converts a numeric expression to the packed or implied-packed decimal data type.

Examples

val = %packed(324)
impval = %packed(436.7, 3)