Telephone Directory

Developer(s): Tim Hartnell
Date: 198x
Type: Program
Platform(s): TS 2068

A telephone number data base.

Appears on

Capital Area Timex Sinclair User Group’s Library Tape.

Related Content

Gallery

Telephone Directory

Source Code

   10 REM TELEPHONE DIRECTORY
   12 REM From Timex Sinclair 2068 explored entered by Izzy Goldsmith LIST Group
   15 GO TO 360
   20 DIM D$(200,32)
   30 FOR D=1 TO 200
   40 INPUT "Enter Name ";B$
   90 PRINT AT 0,0;"Name: ";B$
  110 INPUT "Enter telephone number ";C$
  120 CLS 
  130 PRINT AT 0,0;B$;"  ";C$
  140 PRINT ''"If this is correct, press "; INVERSE 1;"ENTER"; INVERSE 0,"If incorrect, press "; FLASH 1;"'E'"; FLASH 0,"then ENTER"
  150 INPUT E$: CLS 
  160 IF E$<>"" THEN GO TO 40
  170 LET D$(D)=B$+" "+C$
  180 PRINT ''"Press "; INVERSE 1;"ENTER"; INVERSE 0;" to enter next item,","or any letter, then ENTER, to","sort directory"
  190 INPUT E$: CLS 
  200 IF E$="" THEN NEXT D
  210 PRINT PAPER 2; FLASH 1;"sorting..."
  216 POKE 23692,0
  220 LET B=0
  230 LET G=D
  240 LET Z=1
  250 LET B=Z+1
  260 IF B>G THEN GO TO 330
  270 IF D$(B)>D$(Z) THEN GO TO 290
  280 LET Z=Z+1: GO TO 250
  290 LET Q$=D$(Z)
  300 LET D$(Z)=D$(B)
  310 LET D$(B)=Q$
  320 GO TO 280
  330 PRINT D$(G)
  340 LET G=G-1
  350 IF G>0 THEN GO TO 240
  360 PRINT ''"Enter one number:"
  370 PRINT '"1 - To start new directory"
  380 PRINT '"2 - To add new names"
  390 PRINT '"3 - To search for number"
  400 PRINT '"4 - To save directory"
  405 PRINT '"5 - To print directory"
  410 PRINT '"6 - To stop"
  420 INPUT B: CLS 
  430 IF B=1 THEN GO TO 20
  440 IF B =2 THEN NEXT D
  450 IF B=3 THEN GO TO 500
  460 IF B=4 THEN SAVE "DIRECTORY"
  465 IF B=5 THEN FOR A=D TO 1 STEP -1: LPRINT D$(A): NEXT A
  470 IF B=6 THEN STOP 
  480 GO TO 360
  500 PRINT ''"ENTER NAME REQUIRED"
  510 INPUT A$: LET F=LEN A$
  520 PRINT FLASH 1; INK 1;"Searching for  ";A$
  530 FOR A=1 TO D
  540 IF D$(A)( TO F)=A$ THEN PRINT ''D$(A)(F+1 TO ): GO TO 360
  550 NEXT A
  560 PRINT '"Name not found"
  570 GO TO 360
 9998 SAVE "Phonedir" LINE 1
Scroll to Top