Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
34
Task/String-case/Action-/string-case.action
Normal file
34
Task/String-case/Action-/string-case.action
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
INCLUDE "D2:CHARTEST.ACT" ;from the Action! Tool Kit
|
||||
|
||||
PROC UpperCase(CHAR ARRAY text,res)
|
||||
BYTE i
|
||||
|
||||
res(0)=text(0)
|
||||
FOR i=1 TO res(0)
|
||||
DO
|
||||
res(i)=ToUpper(text(i))
|
||||
OD
|
||||
RETURN
|
||||
|
||||
PROC LowerCase(CHAR ARRAY text,res)
|
||||
BYTE i
|
||||
|
||||
res(0)=text(0)
|
||||
FOR i=1 TO res(0)
|
||||
DO
|
||||
res(i)=ToLower(text(i))
|
||||
OD
|
||||
RETURN
|
||||
|
||||
PROC Main()
|
||||
CHAR ARRAY text="alphaBETA"
|
||||
CHAR ARRAY upper(20),lower(20)
|
||||
|
||||
UpperCase(text,upper)
|
||||
LowerCase(text,lower)
|
||||
|
||||
Put(125) PutE() ;clear screen
|
||||
PrintF("Original string: ""%S""%E",text)
|
||||
PrintF("Upper-case string: ""%S""%E",upper)
|
||||
PrintF("Lower-case string: ""%S""%E",lower)
|
||||
RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue