home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
commodor
/
bill-pla
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1993-05-20
|
7KB
|
316 lines
1 REM BILL PLANNER BY TOM COFER
2 REM FINAL VERSION 8 MAR 88..C=64
10 GOSUB60000
20 GOSUB100
25 END
100 PRINTCHR$(147)
110 PRINT SPC(14);"BILL PLANNER"
120 PRINT SPC(14);"BY TOM COFER"
130 PRINT:PRINT
140 PRINT"NUMBER";TAB(16);"FUNCTION"
150 PRINT:PRINT SPC(2);"1";TAB(14);"ENTER BILLS FOR"
160 PRINTTAB(15);"A NEW MONTH"
170 PRINT:PRINT SPC(2);"2";TAB(14);"ADD/DELETE/CHANGE"
180 PRINT TAB(15);"A BILL ON RECORD"
190 PRINT:PRINT SPC(2);"3";TAB(14);"DISPLAY BILLS"
200 PRINT TAB(15);"TO SCREEN"
210 PRINT SPC(2);"4";TAB(14);"PRINT BILLS TO"
220 PRINT TAB(15);"PRINTER"
230 PRINT:PRINT SPC(2);"5";TAB(14);"QUIT"
240 PRINT:PRINT:PRINT "ENTER NO. OF YOUR CHOICE"
250 INPUT R
260 ON R GOTO320,330,340,350,360
270 PRINT CHR$(147)
280 PRINT"[158]";R;" IS AN INVALID ENTRY[146][154]"
290 PRINT:PRINT
300 INPUT"PRESS RETURN TO CONTINUE";L$
310 GOTO 100
320 IFR=1 THEN GOSUB 500
330 IFR=2 THEN GOSUB 1000
340 IFR=3 THEN GOSUB 3000
350 IFR=4 THEN GOSUB 4000
360 IFR=5 THEN RETURN
370 GOTO 100
500 REM ENTRY SUB
510 PRINT CHR$(147)
520 PRINT SPC(15);"BILL ENTRY"
530 PRINT SPC(18);"MENU"
540 PRINT:PRINT
550 PRINT"NUMBER"; TAB(16);"FUNCTION"
560 PRINT:PRINT SPC(2)"1";TAB(14);"ENTER BILLS FOR"
570 PRINT TAB(15);"A NEW MONTH"
580 PRINT:PRINT
590 PRINT SPC(2);"2";TAB(14);"RETURN TO MAIN"
600 PRINT TAB(15);"MENU"
610 PRINT"ENTER NUMBER OF YOUR CHOICE"
620 INPUT K
630 IF K<1 OR K>2 THEN GOTO 660
640 IFK=1 THEN GOSUB 690
650 RETURN
660 PRINT CHR$(147):PRINT"";K;" IS NOT VALID !"
665 PRINT "** RETURNING TO MENU**"
670 PRINT:PRINT
680 INPUT"PRESS RETURN TO CONTINUE";L$
690 PRINTCHR$(147)
700 DIM N$(25)
705 DIM A(25)
710 E=0:B=0:S=0
720 INPUT"ENTER MONTH (DAY/MONTH/YR):";M$
730 INPUT"ENTER PAYCHECK AMOUNT: ";P
740 FORZ=1TO25
750 PRINT CHR$(147)
760 INPUT"ENTER BILL NAME:";B$
765 PRINT
770 INPUT"ENTER BILL AMOUNT: ";C
780 PRINT CHR$(147):PRINT" ";B$;SPC(2);"$";C
790 PRINT"[146]"
800 INPUT"IS DATA CORRECT (Y/N)";L$
810 IFL$="N" THEN GOTO750
820 N$(Z)=B$
830 A(Z)=C
850 INPUT"** ANY MORE (Y/N)";L$
860 IFL$="N" THEN Z=25
870 E=E+1
880 B=B+C
890 NEXTZ
910 PRINTCHR$(147)
920 RETURN
1000 REM MODIFICATIONS SUB
1010 PRINTCHR$(147)
1020 PRINTTAB(10);"*MODIFICATIONS MENU*"
1030 PRINT"NUMBER";TAB(16);"FUNCTION"
1040 PRINT SPC(2);"1";TAB(14);"ADD NEW BILLS"
1050 PRINTTAB(15);"TO PROGRAM"
1060 PRINTSPC(2);"2";TAB(14);"REMOVE A BILL FROM"
1070 PRINTTAB(15);"THE PROGRAM"
1080 PRINT SPC(2);"3";TAB(14);"CHANGE AN ITEM"
1090 PRINT TAB(15);"IN THE PROGRAM"
1100 PRINT SPC(2);"4";TAB(14);"RETURN TO MAIN MENU"
1110 PRINT"ENTER NUMBER OF YOUR CHOICE[154]"
1120 INPUTK
1130 ON K GOTO 1190,1200,1210,1220
1140 PRINTCHR$(147)
1150 PRINT"[158] ";K;" IS AN INVALID ENTRY[146][154]"
1160 PRINT:PRINT
1170 INPUT"PRESS RETURN TO CONTINUE";L$
1180 GOTO 1010
1190 IFK=1THEN GOSUB1300
1200 IFK=2THEN GOSUB1600
1210 IFK=3THEN GOSUB1900
1220 IFK=4THEN RETURN
1230 GOTO1010
1300 REM ADD. SUB
1310 PRINTCHR$(147)
1320 PRINT"THERE IS ROOM FOR ";25-E;"MORE ENTRIES"
1330 IF25-E>0THEN GOTO 1370
1340 PRINT:PRINT
1350 INPUT"PRESS RETURN TO CONTINUE";L$
1360 PRINTCHR(147):RETURN
1370 PRINTCHR$(147)
1380 INPUT"ENTER BILL NAME ";B$
1390 INPUT"ENTER BILL AMOUNT ";C
1400 PRINT"";B$;SPC(2);C
1410 PRINT"*IS THIS CORRECT(Y/N)?"
1420 INPUTL$
1430 IFL$="N" THEN GOTO 1310
1440 E=E+1
1450 N$(E)=B$
1460 A(E)=C:B=B+C
1470 INPUT"ANY MORE(Y/N)";L$
1480 IFL$="N"THEN GOTO1500
1490 GOTO1310
1500 PRINTCHR$(147)
1510 RETURN
1600 REM DELETIONS SUB
1610 PRINTCHR$(147)
1620 PRINT"ENTER NAME OF BILL TO BE REMOVED"
1630 INPUTB$
1640 V=1
1650 IFN$(V)=B$ THEN GOTO 1720
1660 V=V+1
1670 IFV<=E THEN GOTO 1650
1680 PRINTCHR$(147)
1690 PRINT"[158]";B$;" IS NOT ON RECORD[154]"
1700 PRINT:INPUT"PRESS RETURN TO CONTINUE";L$
1710 GOTO1790
1720 PRINT"";N$(V);SPC(2);A(V)
1730 INPUT"REMOVE THIS RECORD(Y/N)???";L$
1740 IFL$="N" THEN GOTO 1790
1750 B=B-A(V)
1770 N$(V)=""
1780 A(V)=0
1790 PRINTCHR$(147):INPUT"ANY MORE DELETIONS(Y/N)";L$
1800 IFL$="Y" THEN GOTO 1610
1810 PRINTCHR$(147)
1820 RETURN
1900 REM CHANGE SUB
1910 PRINTCHR$(147)
1920 PRINTTAB(16);"CHANGES"
1930 PRINT:PRINT"NUMBER";TAB(16);"FUNCTION"
1940 PRINT"1";TAB(14);"CHANGE MONTH"
1950 PRINT"2";TAB(14);"CHANGE PAYCHECK"
1960 PRINTTAB(15);"AMOUNT"
1970 PRINT"3";TAB(14);"CHANGE BILL"
1980 PRINT"4";TAB(14);"RETURN TO MENU"
1990 PRINT"ENTER NUMBER OF YOUR CHOICE"
2000 INPUTO
2010 ON O GOTO 2050,2060,2070,2080
2020 PRINTCHR$(147)
2030 PRINT"[158]";O;" IS AN INVALID ENTRY[146][154]"
2040 GOTO1910
2050 IFO=1 THEN GOSUB2100
2060 IFO=2 THEN GOSUB2200
2070 IFO=3 THEN GOSUB2300
2080 IFO=4 THEN RETURN
2090 GOTO1910
2100 PRINTCHR$(147)
2110 PRINT"MONTH ON RECORD IS ";M$
2120 INPUT"ENTER NEW MONTH";M$
2130 PRINT"MONTH ON RECORD IS NOW: ";M$
2140 PRINT:PRINT:INPUT"PRESS RETURN TO CONTINUE";L$:RETURN
2200 PRINTCHR$(147)
2210 PRINT"PAYCHECK AMOUNT ON RECORD IS:"
2220 PRINTTAB(20);P
2230 PRINT:INPUT"ENTER NEW AMOUNT";P
2240 PRINT:PRINT"PAYCHECK AMOUNT ON RECORD IS NOW:"
2250 PRINTTAB(20);P
2260 S=P-B:S=S*1000:S1=INT(S):SV$=STR$(S1)
2262 IF RIGHT$(SV$,1)>"4"THENS1=S1+10
2264 S1=INT(S1/10):S=S1/100
2270 INPUT"PRESS RETURN TO CONTINUE";L$
2280 RETURN
2300 PRINTCHR$(147):INPUT"ENTER BILL TO CHANGE";B$
2310 V=1
2320 IFN$(V)=B$ THEN GOTO 2390
2330 V=V+1
2340 IFV<=E THEN GOTO2320
2350 PRINTCHR$(147)
2360 PRINT"[158]";B$;" IS NOT ON RECORD[154]"
2370 PRINT:INPUT"PRESS RETURN TO CONTINUE";L$
2380 GOTO2530
2390 PRINT:PRINTTAB(12)"OLD RECORD:"
2400 PRINTN$(V);SPC(2);A(V)
2410 PRINT:INPUT"CHANGE BILL NAME(Y/N)";L$
2420 IFL$="N" THEN GOTO 2450
2430 INPUT"ENTER NEW NAME";B$
2440 N$(V)=B$
2450 PRINT:INPUT"CHANGE BILL AMOUNT(Y/N)";L$
2460 IFL$="N" THEN GOTO2530
2470 B=B-A(V)
2480 INPUT"ENTER NEW AMOUNT";C
2490 B=B+C
2510 A(V)=C
2520 PRINT
2530 INPUT"ANY MORE RECORDS TO CHANGE(Y/N)";L$
2540 PRINTCHR$(147)
2550 IFL$="Y" THEN GOTO 2300
2560 RETURN
3000 REM SCREEN DISPLAY SUB
3010 PRINTCHR$(147)
3012 S=P-B:S=S*1000:S1=INT(S):SV$=STR$(S1)
3016 IFRIGHT$(SV$,1)>"4"THENS1=S1+10
3018 S1=INT(S1/10):S=S1/100
3020 FORD=1TO5
3030 PRINTTAB(12);"*B[150]I[144]LL[158] P[129]L[159]A[149]N[151]N[152]E[153]R[156]*[154]"
3050 FORQ=1TO300:NEXTQ
3060 NEXTD
3070 PRINTCHR$(147)
3075 PRINTTAB(5);"BILLS FOR:";M$
3080 FORV=1 TO E
3085 IFN$(V)=""THEN GOTO 3120
3090 PRINTN$(V);TAB(30);"$";A(V)
3100 FORD=1TO1000
3110 NEXTD
3120 NEXTV
3230 PRINT"****************************************"
3235 PRINT""
3240 PRINT"PAYCHECK AMOUNT:";TAB(30);"$";P
3250 PRINT"TOTAL AMOUNT OF BILLS:";TAB(30);"$";B
3260 IFB>P THEN GOTO3290
3270 PRINT"TOTAL AMOUNT LEFT:";TAB(30);"$";S
3280 GOTO3310
3290 PRINT"[158]BILLS TOTAL MORE THAN"
3300 PRINT"PAYCHECK:[146][154]";TAB(28);"--$";S
3310 PRINT:PRINT
3320 INPUT"DISPLAY AGAIN(Y/N)";L$
3330 IFL$="Y"THEN GOTO 3070
3340 RETURN
4000 PRINT CHR$(147)
4010 PRINT TAB(13);"PRINTOUT MENU"
4020 PRINT"NUMBER";TAB(16);"FUNCTION"
4030 PRINT"1";TAB(14);"PRINT A HARDCOPY"
4040 PRINT TAB(15);"TO PRINTER"
4060 PRINT"2";TAB(14);"RETURN TO MAIN MENU"
4070 PRINT"ENTER NUMBER OF YOUR CHOICE"
4080 INPUT K
4090 ON K GOTO 4140,4150
4100 PRINT CHR$(147)
4110 PRINT"[158]";K;" IS AN INVALID ENTRY[154]"
4120 PRINT:INPUT"PRESS RETURN";L$
4130 GOTO4000
4140 IF K=1 THEN GOSUB4180
4150 IF K=2 THEN RETURN
4170 GOTO4000
4180 REM PRINTER SUB
4190 PRINTCHR$(147)
4192 S=P-B:S=S*1000:S1=INT(S):SV$=STR$(S1)
4196 IFRIGHT$(SV$,1)>"4"THENS1=S1+10
4198 S1=INT(S1/10):S=S1/100
4200 PRINT"*TURN ON & PREPARE PRINTER*"
4210 PRINT:INPUT"PRESS RETURN WHEN READY";L$
4220 A$="BILLS FOR: "
4230 C$="PAYCHECK AMOUNT:"
4240 D$="TOTAL AMOUNT OF BILLS:"
4250 G$="TOTAL AMOUNT LEFT:"
4260 H$="$"
4270 OPEN4,4
4275 PRINT#4,SPC(20);A$;M$
4280 FORV=1 TO E
4290 IFN$(V)="" THEN GOTO 4320
4291 XV$=N$(V)
4292 IF LEN(XV$)>=15 THEN GOTO 4310
4293 X2=LEN(XV$)
4294 X3=(15-X2)+5
4295 PRINT#4
4296 PRINT#4,N$(V);SPC(X3);H$;A(V)
4297 GOTO4320
4310 PRINT#4
4315 PRINT#4,N$(V);SPC(5);H$;A(V)
4320 NEXTV
4330 PRINT#4,"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
4335 PRINT#4
4340 PRINT#4,C$, ,H$;P
4350 PRINT#4
4360 PRINT#4,D$," ";H$;B
4370 PRINT#4
4380 PRINT#4,G$," $";S
4390 PRINT#4
4400 CLOSE4
4410 RETURN
60000 REM 64/128 TITLE ANIMATOR - JOE CHARNETSKI
60010 FD=8:DIMFL$(FD)
60020 FL$(1)="BILL PLANNER"
60030 FL$(4)="FOR MONTHLY BUDGETTING"
60040 FL$(6)=" BY TOM COFER
60060 FC$(1)[178]"OPEN":FC$(2)[178]"CLR":FC$(3)[178]""
60070 [129]I[178]1[164]FD:FS[178][195](FL$(I)):[139]FH[179]FS[167]FH[178]FS
60080 [130]:FH[178]FH[170]4:FV[178][181]((25[171]FD[171]2)[173]2)
60090 [129]I[178]1[164](40[171]FH)[173]2:FX$[178]FX$[170]"":[130]
60100 [139]FV[177]2[167][129]I[178]1[164]FV[171]1:FY$[178]FY$[170]"":[130]
60110 [129]I[178]1[164]3:[135]F1,F2,F3,F4
60120 [129]J[178]1[164]FH:F5$(I)[178]F5$(I)[170][199](F1)
60130 F7$(I)[178]F7$(I)[170][199](F3)[170]"CMDCMD":[130]
60140 [129]J[178]1[164]FD[170]2:F6$(I)[178]F6$(I)[170]"CMD"[170][199](F2)
60150 F8$(I)[178]F8$(I)[170]"ON"[170][199](F4)[170]"CMD":[130]:[130]
60160 [129]I[178]1[164]3:FA$(I)[178]""[170]FY$[170]FX$[170]FC$(I)[170]F5$(I)[170]F6$(I)
60170 FB$(I)[178]"CMD"[170]F7$(I)[170]""[170]F8$(I):[130]
60180 :
60190 [151]53280,2:[151]53281,0
60200 [153]"LOADLIST"FY$
60210 [129]I[178]1[164]FD:[153][163]20[171][195](FL$(I))[173]2)FL$(I):[130]
60220 [129]I[178]1[164]3:[153]FA$(I)FB$(I)
60230 [129]FZ[178]1[164]25:[130]:[130]
60240 [161]A$:[139]A$[178]""[137]60220
60250 [153]"LOADCONT":[151]53280,14:[151]53281,6:[151]646,14:[142]
60260 [131]164,167,163,165,175,170,183,181,185,182,184,161