The CENTER command file is an example of string manipulation functions. It centers a supplied string and displays it on $STDLIST, usually the user's terminal screen.
A character string is entered as parameter data when the command file is invoked. The variable CENT_SPC is defined as a string variable of 40 blank spaces. A portion of this string of blanks is inserted on the left side of the original text string to center it. The expression determines the number of blanks to be entered and adds them to the character string before echoing the phrase. Note that parameters must always use explicit dereferencing.
The repeat function can also be used to simplify this routine.