Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/String-case/XPL0/string-case.xpl0
Normal file
18
Task/String-case/XPL0/string-case.xpl0
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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);
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue