Skip to main content

DECIMAL

This script will return a string which has a specified number of digits from the decimal point. The number is always rounded down.


FORMAT: DECIMAL (number, number of digits)


DEFINITIONS:

  • Num­ber: Numer­i­cal expres­sion for the num­ber of dig­its.

If pos­i­tive, it specifies the num­ber of dig­its to show at the right of the dec­i­mal point. If neg­a­tive, it specifies the num­ber of dig­its to the left of the dec­i­mal point start­ing at tens.


EXAMPLE 1:

show DECIMAL (34.235, 2)

Shows 34.23.

EXAMPLE 2:

show DECIMAL (3423.456, -2)

Shows 3400.