Number to Word

See all articles from T-S Horizons n14

Number To Word is a short (relatively) program that converts a 7 digit phone number into all possible combinations of the letter-number equivalent. (2187 of them!)

If you enter your phone number, you might find a easily remembered “word” that matches your phone number. For instance, the number 266-8378 would yeild the word “convert”.

An explanation of the program follows.

To use the program, just enter “RUN” when you see a likely word, press any key and the program will pause momentarily while you record the word.

LINE #      EXPLANATION

20          "POKES" the 2068 into capitals only mode
80          dimensions the string variables and sets up A$ to
            contain the letter equivalent on numbers 2-9
100 - 160   routine enters and error traps the phone number
180 - 240   sets up array "N" to "POINT" to all possible
            combinations of letters
260 - 310   converts the number into an alpha string of 7
            characters. ( 290 "POKES" the 2068 to scroll
            automatically)
300 - 400   ends processing.
  1 REM NUMBER TO WORD 2068 VERSION **********************
10 REM SETUP
20 POKE 23658,8
30 DIM A$(3,10)
40 DIM C$(7)
50 DIM N(7)
60 LET A$(1,1 TO 10)="01ADGJMPTW"
70 LET A$(2,1 TO 10)="01BEHKNRUX"
80 LET A$(3,1 TO 10)="01CFILOSVY"
90 REM DATA ENTRY
100 INPUT "7 DIGIT NUMBER? ";B$
110 IF LEN B$<>7 THEN GO TO 50
120 PRINT AT 21,0;B$
130 INPUT "IS THE NUMBER CORRECT? Y/N; ";D$
140 IF D$="y" OR D$="Y" THEN GO TO 160
150 GO TO 100
160 CLS
170 REM PROCESSING
180 FOR A=1 TO 3: LET N(1)=A
190 FOR B=1 TO 3: LET N(2)=B
200 FOR C=1 TO 3: LET N(3)=C
210 FOR D=1 TO 3: LET N(4)=D
220 FOR E=1 TO 3: LET N(5)=E
230 FOR F=1 TO 3: LET N(6)=F
240 FOR G=1 TO 3: LET N(7)=G
250 REM CONVERSION
260 FOR H=1 TO 7
270 LET C$(H)=A$(N(H),VAL B$(H)+1)
280 NEXT H
290 POKE 23692,255
300 PRINT C$
310 IF INKEY$<>"" THEN PAUSE 160
320 REM CONTINUE PROCESSING
330 NEXT G
340 NEXT F
350 NEXT E
360 NEXT D
370 NEXT C
380 NEXT B
390 NEXT A
400 PRINT "PROGRAM COMPLETE"

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