Case Swap

Publication: SLUG Newsletter
Date: July 1987
Pages: 5

This little program will come in handy some day when you want to change your long program from lower case to upper case, and don’t want to type it in all over. It will swap upper to lower or lower to upper in a flash (two flashes for long programs)

Try it out, it will only take a few minutes to key in.

  5 CLS : PRINT ''"TO LIST IN LOWER CASE, PRESS ""L"""
10 PRINT ''"TO LIST IN UPPER CASE, PRESS ""U"""
15 LET I$=INKEY$
20 IF I$=CHR$ 108 OR I$=CHR$ 76 THEN LET L=1: GO TO 35
25 IF I$=CHR$ 117 OR I$=CHR$ 85 THEN LET L=0: GO TO 35
30 GO TO 15
35 CLS : PRINT FLASH 1;"READING THROUGH PROGRAM"
40 DEF FN P(A)=PEEK A+256*PEEK (A+1)
45 LET PROG=FN P(23635)
50 LET A=PROG-5
55 LET A=A+5
60 LET P=PEEK A
65 IF A>=FN P(23627) THEN CLS : LIST : STOP
70 IF P=13 THEN GO TO 55
75 IF P=14 THEN LET A=A+1: GO TO 55
80 IF L THEN GO TO 90
85 IF P>=97 AND P<=122 THEN POKE A,P-32: GO TO 95
90 IF P>=65 AND P<=90 THEN POKE A,P+32
95 LET A=A+1: GO TO 60
9998 SAVE "CASE SWAP" LINE 0

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.