19 lines
517 B
Plaintext
19 lines
517 B
Plaintext
string 0; \use zero-terminated string convention
|
|
include c:\cxpl\stdlib; \ToUpper, ToLower, and 'code' declarations
|
|
|
|
proc StrToUpper(S); \Convert string to uppercase characters
|
|
char S;
|
|
while S(0) do [S(0):= ToUpper(S(0)); S:=S+1];
|
|
|
|
proc StrToLower(S); \Convert string to lowercase characters
|
|
char S;
|
|
while S(0) do [S(0):= ToLower(S(0)); S:=S+1];
|
|
|
|
char Str;
|
|
[Str:= "alphaBETA";
|
|
StrToUpper(Str);
|
|
Text(0, Str); CrLf(0);
|
|
StrToLower(Str);
|
|
Text(0, Str); CrLf(0);
|
|
]
|