home *** CD-ROM | disk | FTP | other *** search
- 1 ' UPCASE = Routine to change all lowercase letters in CS$ to uppercase 11/4/82 John Sigle
- 5 '
- 10 ' Demonstration of UPCASE
- 20 CLS : LOCATE 10,3
- 22 PRINT "This is a routine to change all lowercase letters to uppercase"
- 24 PRINT:PRINT
- 30 LINE INPUT "Enter uppercase and lowercase letters, or press ENTER to quit.";CS$
- 35 IF CS$="" THEN GOTO 65000 ' END
- 38 GOSUB 401
- 40 PRINT "Uppercased string is --- ";CS$
- 50 GOTO 30
- 100 '
- 400 ' UPCASE = Routine to change all lowercase letters in CS$ to uppercase
- 401 L%=LEN(CS$)
- 403 FOR K%=1 TO L%
- 405 O%=ASC(MID$(CS$,K%,1))
- 407 IF O%>96 AND O%<123 THEN MID$(CS$,K%,1)=CHR$(O%-32)
- 409 NEXT K% :RETURN