qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
UpCase Function
  Summary Details Example                                   Back
 
  Argument
 
    character    Character expression
 
  Returns
 
    Char         Uppercase form of the character if a lowercase
                 letter; otherwise, the original argument
 
  Description
 
    The UpCase function takes a character expression representing a
    lowercase letter and returns the letter in uppercase form.
 
    UpCase returns uppercase forms of the lowercase letters in the
    range a..z (ASCII range 97..122). If passed any other character,
    UpCase returns the same character.
 
    To return the lowercase form of an uppercase letter, use the Chr
    and Ord functions. Chr returns the lowercase form of an alphabetic
    character when 32 is added to the ASCII value for the uppercase
    form of the letter:
 
       result := Chr( Ord( character ) + 32 );
 
    UpCase is useful for comparing user input against an expected
    character. For example, to allow a user to enter an answer of
    either 'Y' or 'y':
 
       IF ( UpCase( answer ) = 'Y' ) ...