IB Statements/adjust

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: '''ADJUSTL and ADJUSTR functions''' '''Syntax:''' ADJUSTL(string-argument) ADJUSTR(string-argument) '''Discussion:''' The ADJUSTL and ADJUSTR functions left- and right-justify, resp...)
Newer edit →

Revision as of 10:36, 22 May 2009

ADJUSTL and ADJUSTR functions Syntax: ADJUSTL(string-argument) ADJUSTR(string-argument)

Discussion: The ADJUSTL and ADJUSTR functions left- and right-justify, respectively, a string argument. The string argument may be a string constant, a single-element string variable, a string array element, a string expression or a string function.

The ADJUSTL function removes leading blanks from the string argument and appends trailing blanks to retain the original string argument length.

The ADJUSTR function removes trailing blanks from the string argument and inserts an equal number of leading blanks to retain the original string argument length.

Note: ADJUSTL and ADJUSTR do not alter string length.

Example 1: A$ = ADJUSTL(B$)

If B$ = " ABC" (notice the leading blank spaces), the ADJUSTL function yields A$ = "ABC " (notice the trailing blanks).


Example 2: A$ = ADJUSTR(B$)

If B$ = "ABC " (notice the trailing blank spaces), the ADJUSTR function yields A$ = " ABC" (notice the leading blanks).

Personal tools