Previous Topic: $WHEREFROM()Next Topic: ALLOC()


ALIGN()

This function returns a numeric string that is padded on the right with blanks so that decimal points line up. You can also add commas to the integer portions of the number.

Syntax

ALIGN(value,right,[COMMAS])

Parameters

value

Numeric input string.

right

Number indicating the number of positions to the right of the decimal point. Trailing blanks are added and truncation can occur.

COMMAS

Inserts commas in the integer portion of the number.

Return Codes

101 - 103

ARG n MISSING OR INVALID

Example

align('100',2)           == '100. ' /* Pad with 2 blanks */
align('1000',0,'COMMAS') == '1,000.'/* Add commas   */