TOUPPER |
toupper is used to transform all the lower case letters of a character string to upper case.
toupper( expr_c )
|
Element |
Description |
Restrictions |
|
expr_c |
Alphanumeric expression. |
None. |
# Transformation of lower case to upper
case;
# This programme displays
'COCKADOODLEDOO!!!'
Infbox toupper ("CockaDoodleDoo!!!
")
# Compare strings (ignoring upper/lower
case differences)
If toupper (NOM_1) = toupper (NOM_2)
Infbox "The
names are identical!"
Endif
toupper is used to transform all the lower case letters of a character string to upper case without affecting the rest of the string.
In particular, accented letters are transformed into upper case accented letters. To compare character strings independently of the accents, the ctrans function will be used, that transforms accented characters in the argument string into non-accented characters.
The result is a Char type.
The format$ function, associated with a format containing type 'A' characters (upper case letters) will also perform this kind of transformation, with two differences, however:
· the length of the string obtained is fixed, however, and depends on the length of the format (spaces are added at the start, the end or at both ends, depending on the justification option chosen).
· if different characters of a non-accented letter are found in the string to be processed, format$ will reject the formatting overall and will return a string filled with spaces.
|
Error |
Description |
|
ERMODE (10) |
The argument is not alphanumeric. |
|
|