Pads strings of a text structure with extra characters so that their lengths are equal (J.T.N.M. Thissen).
||Character(s) used for padding; default uses the dot character
||Whether the character(s) of
||Whether to remove initial and/or trailing spaces in the strings of
||Texts to be padded; must be set|
||Saves the padded texts|
||Sets a limit on the length of the strings in the padded texts; default is the width of the largest string in
TXPAD can be used to make the strings of a text of equal length by padding them with extra characters. This may be used to make printed output more readable. The text is specified by the
OLDTEXT parameter, and the new text can be saved by the
NEWTEXT parameter. If
NEWTEXT is not specified, the new text values replace those in
OLDTEXT. The length can be specified by the
WIDTH parameter, which defaults to the number of characters of the largest string.
The character(s) to be added to the strings with smaller length can be specified by the
PADDINGCHARACTERS option, with a default of the dot character(
METHOD option specifies whether the characters of
PADDINGCHARACTERS are placed before or after the strings of
OLDTEXT (default after). The
REMOVESPACES option specifies whether leading and/or trailing spaces in the strings of
OLDTEXT should be removed; the default is to remove no spaces.
OLDTEXT structure is restricted, only the restricted units are modified to have equal widths. If the
OLDTEXT structure is restricted and a
NEWTEXT structure is specified, the units of
NEWTEXT not in the restriction set are set to repeated
Commands for: Calculations and manipulation.
CAPTION 'TXPAD example'; STYLE=meta TEXT [VALUES=Amsterdam,London,Paris] old TXPAD old; NEWTEXT=new PRINT old,new; FIELD=14 TXPAD [PADDINGCHARACTERS='<'; METHOD=before] old; NEWTEXT=new; WIDTH=10 PRINT old,new; FIELD=14