IB Statements/lcase
From CometWiki
(New page: '''LCASE function''' '''Syntax:''' LCASE(string-argument) '''Discussion:''' The LCASE function converts upper case characters in a string-argument to lower case characters. Other ch...)
Newer edit →
Revision as of 11:05, 22 May 2009
LCASE function
Syntax: LCASE(string-argument)
Discussion: The LCASE function converts upper case characters in a string-argument to lower case characters. Other characters in the string-argument (e.g., lower case characters, special characters) remain unchanged.
The string-argument may be a string constant, a single-element string variable, a string array element, a string expression, or a string function.
Also see UCASE.
'Example 1:'Bold text Y$ = LCASE(X$)
In the above example, any upper case characters contained in X$ are converted to lower case and the entire string is moved to Y$. For example, if X$ equals "Signature Systems" then Y$ will equal "signature systems".
Example 2:
INPUT (0) ANSWER$ IF LCASE(ANSWER$) = "y" THEN GOTO 9000
In this example, the variable ANSWER$ is used to receive input data from the terminal (logical unit 0). The data is then converted to lower case and compared to "y". If it equals "y" the program branches to statement 9000. Otherwise, program flow continues below the IF statement.