| Programming | | The UCase and LCase Functions: |
|
The UCase and LCase Functions - Example Problem 8C:
When programming with string
comparisons the .NET environment is case-sensitive. This means the string “A” is not the same as the string “a”. If you had an IF statement that was
making a test with your string input for example: If EmployeesCODE = “A” Then, and during run time the user entered a lower
case “a” for the EmployeesCODE, the test would not be true and would follow
the false path. This is where the UCase
and LCase function is used to help the overall control structure of
strings. The UCase and LCase function
actually changes the string to uppercase or lowercase letters
respectively.
The example below is of Example
8 and will continue to build this Example 8 on the UCase and LCase Functions to show the UCase(uppercase) function used with the IFTHENELSE statement. The UCase(uppercase) function is used to change the variable EmployeesCODE to an upper case letter. This method will help the program work correctly and effectively. You would apply the same
steps if you wanted to use the LCase function. As you can see below the LCase(lowercase)
function is used to change the variable EmployeesCODE to a lower case letter.
How to save a Word file to a pdf right click mouse and select... (Open link in new tab)
|