$Justify()

Examples of $JUSTIFY()

The $JUSTIFY function returns a formatted string.

The format for the $JUSTIFY function is:

    $J[USTIFY](expr,intexpr1[,intexpr2])
    

$JUSTIFY() fills expressions to create fixed length values. However, if the length of the specified expression exceeds the specified field size, $JUSTIFY() does not truncate the result (although it may still round based on the third argument). When required, $EXTRACT() performs truncation.

$JUSTIFY() optionally rounds the portion of the result after the decimal point. In the absence of the third argument, $JUSTIFY() does not restrict the evaluation of the expression. In the presence of the third (rounding) argument, $JUSTIFY() evaluates the expression as a numeric value. The rounding algorithm can be understood as follows: