80-Bus News

  

January–February 1983, Volume 2, Issue 1











Page 18 of 56











Data base handler by M. L. Trim.

100 110 120 130 140 150 160 170 180 190 200 240 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660

CLEAR 10000 : DIM A$(6,200) : LN=200

DATA 27085 ,14336,-13564, 6399, 18178, 10927

DATA -8179, 233

DATA 31711, 1080,-53,536, -20665, 3370, -5664,0

DATA 4100,3340 : FOR I=3340 TO 3354 STEP 2

READ J : DOKE I,J : NEXT

GOTO 720

REM

REM 1. Input list routine

PRINT"To abort I/P type O on request for customer." FOR I=4 TO LN

GOSUB 1110

IF A$(O0,I)="0" THEN 240

NEXT I

PRINT"Press R to return to menu"

Z2=USR(O) : IF 2=82 THEN 720

GOTO 250

REM

REM 2. Display list

CLS : A=O

FOR I=1 TO LN

GOSUB 1220

A=A+1 : IF I=LN THEN 420

IF A=2 THEN 350

GOTO 410

T$="Press C to continue”

FOR T=1 TO LEN(TS) : POKE 3030+ASC(MIDS(T$,T,1)) NEXT T : A=O

ZUSR(O) : IF Z=67 THEN CLS : GOTO 410

Z=USR(O) : IF 2=82 THEN I=LN : COTO 720

GOTO 380

NEXT I

T$="Press R to return to menu”

FOR T=1 TO LEN(TS) : POKE 3030+ASC(MIDS(7$,T,1)) NEXT ?

Z=USR(O) + IF 2#82 THEN 720

GOTO 450

REM

REM 4. Save list

INPUT"Do you wish to save on disk (Y/N) “;c$

IF C$="Y" THEN 520

GOTO 720

SETCLS(1) : SETNEW(1),"DATA.TX",S : FOR I=1 TO LN FOR J=0 T0 6 : SETOUT(1),A$(J,1) : NEXT J : NEXT T SETCLS(1) : GOTO 720

REM

REM 5. Load list

SETCLS(1) : SETNEW(1),"DATA.TX" : FOR I=1 70 LN FOR J=0 TO 6 : SETINP(1),A8(J,1) : NEXT J : NEXT T GOTO 590

CLs

PRINT” Thank you and goodbye." END

REM

REM 3. Change list

INPUT"Enter number of the item to change ";I GOSUB 1110

.

670 680 690 TOO 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 870 880 890 900 910 g20 930 940 950 960 970 980 990

PRINT"Press R to return to menu"

Z=USR(O) : IF 282 THEN 720

GOTO 680

REM

REM Menu routine

CLS

PRINT TAB(15)

PRINT TAB(15)

PRINT TAB(15)

PRINT TAB(15)

PRINT TAB(15)

PRINT TAB(15) ) )

"4. Input list" :"2. Display list" ;"3. Change list" 3"4. Save list” 7"5. Load list” ;"6. Print list" 3"7. Find customer" ;"8. End program"

PRINT TAB(15 PRINT TAB(I5 PRINT INPUT"Enter number of function required ";N

IF (N<1) + (NOS) THEN 720

ON N GOTO 190,290,650, 490,570,870, 940,600

REM

REM 6. Print list

CLS : INPUT"Number of customers to list "s;LN WIDTH 255 : LINES 2000 : SETPROW

FOR I=#1 TO LN

GOSUB 1220 : NEXT I

WIDTH 48 : LINES 5 : SETPROFF : GOTO 450

REM

REM 7. Find customer

CLs

PRINT" Type ist 4 letters customer to be ” INPUT" Located"; H$

FOR I=1 TO LN : IF H$=LEFTS(A$(0,1),4) THEN 1030 NEXT T

FOR I=1 TO LN : IF HS<A$(0,I) THEN 1030

1000 NEXT I 1010 PRINT"Customer not on file” ; FOR T=1 TO 2000 : NEXT T 1020 GOTO 720

1030 GOSUB 1220

1040 INPUT’Do you wish to copy to printer ";KS 1050 IF K&="Y" THEN 1070

1060 I=LN : GOTO 720

1070 SETPRON : GOSUB 1220

14080 I=LN : SETPROFF : GOTO 720

1090 REM

1100 REM Subroutine to get name and address input 1110 PRINT’ Customer’s name" ; INPUT A$(0,I)

1120 IF A$(O,1)="0" THEN I=LN : RETURN

1130 INPUT"and address 1";48(1,T)

1140 INPUT"and address 2";A4$(2,1)

1150 INPUT"and address 3";A$(3,I)

1160 INPUT"and address 4";A$(4,1)

1170 INPUT"and address 5";A$(5,I)

1180 INPUT"and telephone ";A48(6,1)

4190 RETURN

1200 REM

1210 REM Subroutine to print name and address 1220 PRINT I" “:A$(0,T)

1230 FOR J=1 T0 6: PRINT " "SaS(J,I) : NEXT J 1240 RETURN

18


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 18 of 56