1 ' 	ELECTRONIC CARD FILE
2 '  BY Joe Wiellette  617-731-3178
3 ' Permission is granted to use, but not to sell,
4 ' these programs.
50 DEFINT S,L,D,I,J,K,T
52 WIDTH 52
55 ON ERROR GOTO 10000
100 PRINT CLSCR$;
200 PRINT"1)	Background information
220 PRINT"2)	Program & files used
240 PRINT"3)	Create a file
260 PRINT"4)	Work on a file
280 PRINT"5)  Return to main menu
300 ALLOWED$="12345":GOSUB 5000:IF ALLOWED=0 THEN 100
320 ON Q GOSUB 1000,2000,3000,4000
340 IF Q=5 THEN RUN"MENU
400 CLOSE
450 GOTO 100
1000 '
1010 '	BACKGROUND INFORMATION
1030 '
1100 RUN"HELP-1
2000 '
2010 '		PROGRAMS & FILES USED
2020 '
2030 COUNT=1
2040 PRINT CLSCR$;
2100 OPEN"I",#1,"HELP-2"
2120 IF EOF(1) THEN 10050:RETURN
2150 LINE INPUT#1,A$
2160 PRINT A$
2180 IF COUNT=20 THEN GOSUB 10050:COUNT=1

	ELSE COUNT=COUNT+1
2200 GOTO 2120
3000 '
3010 '		CREATE A FILE
3020 '
3030 COUNT=1
3040 PRINT CLSCR$;
3100 OPEN"I",#1,"HELP-3"
3120 IF EOF(1) THEN 10050:RETURN
3140 LINE INPUT#1,A$
3180 PRINT A$
3190 IF COUNT=20 THEN GOSUB 10050:COUNT=1

	ELSE COUNT=COUNT+1
3200 GOTO 3120
4000 '
4010 '		WORK ON A FILE
4020 '
4030 PRINT CLSCR$;
4040 COUNT=1
4100 OPEN"I",#1,"HELP-4"
4120 IF EOF(1) THEN 10050:RETURN
4140 LINE INPUT#1,A$
4160 PRINT A$
4180 IF COUNT=20 THEN GOSUB 10050:COUNT=1

	ELSE COUNT=COUNT+1
4200 GOTO 4120
5000 '
5010 '		***  ENTER RESPONSE ***
5020 '
5100 PRINT BELL$;
5110 ALLOWED=0
5120 Q$=INPUT$(1)
5130 PRINT Q$
5140 IF Q$="y" THEN Q$="Y"
5150 IF Q$=CHR$(13) THEN Q$=DEFAULT$
5160 Q=VAL(Q$)
5170 FOR L=1 TO LEN(ALLOWED$)
5180 IF MID$(ALLOWED$,L,1)=Q$ THEN ALLOWED=1
5190 NEXT L
5200 RETURN
5210 '
5220 '
10000 REM ***********  ERROR HANDLING  **************
10030 IF ERR=13 THEN PRINT"Incorrect type of input. Start over.":CLOSE:GOTO 290
10040 ON ERROR GOTO 0
10050 REM ------- INPUT TO RETURN -----
10060 PRINT CHR$(7);
10070 PRINT UNDER$"   TAP RETURN TO CONTINUE "STOP.UNDER$
10080 Q$=INPUT$(1)
10090 IF Q$=CHR$(13) THEN Q$="0"
10100 RETURN
10070 PRINT UNDER$"   TAP RETURN