Skip to content
HPCCSystems Solutions Lab
HPCCSystems Solutions Lab


A packed decimal value of n total digits. If you have a fixed precision, use decimal instead of REAL.


[UNSIGNED] DECIMALn [_y]  attribName
[UNSIGNED]Optional, if omitted the rightmost nibble holds the sign.
nTotal digits.
[_y]Optional, if present, the y defines the number of decimal places in the value.
attribNameThe name by which the variable will be invoked.

Keep in mind that y should always be less than or equal to n, and max is 32 leading total.


DECIMAL Examples.

// Defining a four digit value with two digit decimal placeholder.
DECIMAL4_2 Num1 := 12.36;

// Defining a five digit value with two digit decimal placeholder.
DECIMAL5_3 Num2 := 13.56;

OUTPUT(Num1, NAMED('Num1'));
OUTPUT(Num2, NAMED('Num2'));
Try Me