SCALERIGHTF Function

── SCALERIGHTF ── ( ──<arithmetic expression>── , ─────────────────────►
►─<arithmetic expression>── ) ─────────────────────────────────────────┤

The SCALERIGHTF function returns, as a real value, a left-justified, packed decimal (4-bit decimal) number representing the following, where the second arithmetic expression, rounded to an integer, has a value in the range 0 to 12:

first <arithmetic expression> MOD (10 ** second <arithmetic expression>)

A run-time error occurs if the integerized value of the second arithmetic expression is less than 0 or greater than 12.

The number of significant digits returned by the function is equal to the integerized value of the second arithmetic expression. The external sign flip-flop (EXTF) is set to reflect the sign of the first arithmetic expression for use with the editing phrases specified in a PICTURE declaration.

Examples of the SCALERIGHTF Function

SCALERIGHTF(1234,4) = 4"123400000000"

SCALERIGHTF(12345678,12) = 4"000012345678"