RosettaCodeData/Task/String-case/Commodore-BASIC/string-case.basic

15 lines
331 B
Plaintext

10 rem string case
15 rem rosetta code
20 s$="alphaBETA"
30 print chr$(147);chr$(14)
40 print "The original string is:"
41 print:print tab(11);s$
50 up$="":lo$=""
55 for i=1 to len(s$)
60 c=asc(mid$(s$,i,1))
65 up$=up$+chr$(c or 128)
70 lo$=lo$+chr$(c and 127)
75 next i
80 print:print "Uppercase: ";up$
90 print "Lowercase: ";lo$