Previous Page | Next Page

SAS Component Language Dictionary

CENTER



Returns a centered character string
Category: Character

Syntax
Details
See Also

Syntax

centered-string=CENTER(string<,length>);

centered-string

contains the centered character string. If centered-string already exists, then specifying length changes the length of centered-string to the number of characters specified in length.

Type: Character

string

contains the character string to be centered.

Type: Character

length

contains the length in which the character string is to be centered. The default is the maximum length of centered-string.

Type: Numeric


Details

The default length is the maximum length of centered-string. The string is centered by padding with spaces. To enable CENTER to work properly when centered-string is a window variable, set the justification attribute (JUST) for the control or field to NONE.

To left- or right-justify a string, use LEFT or RIGHT, respectively.


See Also

LEFT

RIGHT

Previous Page | Next Page | Top of Page