PAD() Function - Set Padding

Syntax

PAD(str,len{,padtype{,padchr}}{,ERR=lineref})

Description

The PAD() function pads a specified string.

Parameter

Description

str

String to be padded.

len

Length of str.

padtype

Pad type: "L" (for left justification), "C" (for center justification), or "R" (for right justification).

padchr

Pad character, which can be any string. The first character is used to pad new space in the output string.

ERR=lineref

Branch to be taken if an error occurs during execution.

 

Examples

>PRINT PAD("A",6,"C","-")

--A---
>PRINT PAD("A",6,"R")

A

>PRINT PAD("A",6,"_")

A_____

See Also

Functions - Alphabetical Listing