--- title: "Case Swap" type: "article" slug: "case-swap" url: "http://localhost/article/case-swap/" markdown_url: "http://localhost/article/case-swap.md" published_at: "2026-11-27T16:18:04+00:00" modified_at: "2026-11-27T16:31:26+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "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…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" publication_r: id: 28015 title: "SLUG Newsletter" type: "periodical" url: "http://localhost/periodical/s-l-u-g-newsletter/" issues_articles: - id: 39554 title: "SLUG Newsletter July 1987" type: "issue" url: "http://localhost/issue/slug-newsletter-july-1987/" pages: "5" pubdate: "July 1987" archive_link: false --- # Case Swap 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 ```