Previous Topic: $WHEREFROM()

Next Topic: ALLOC()

ALIGN()

Use the ALIGN() function to return 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

The ALIGN() function has this syntax:

ALIGN(value,right,[COMMAS])

Arguments

The ALIGN() function takes these arguments:

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

The ALIGN() function produces these 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   */