home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
100
/
31
/
chekbook.bas
< prev
next >
Wrap
BASIC Source File
|
1983-05-29
|
4KB
|
78 lines
80 MAINMENU$="no"
100 CLS
110 PRINT TAB(20)"Checkbook Balance Program"
120 PRINT TAB(20)"AUTHOR--Bruce T. Filbeck"
121 PRINT TAB(20)" 4240 KILGORE RD "
122 PRINT TAB(20)" CROSWELL, MI 48422"
130 'Set the 10-key pad to numeric shift
140 DEF SEG=&H40:POKE &H17,PEEK(&H17) OR 32
150 'Clear the screen and begin
160 PRINT :PRINT :PRINT :PRINT
170 INPUT;"Enter the NEW BALANCE from your statement:",NEWBAL$ :PRINT
180 IF NEWBAL$="" THEN BEEP:GOTO 170
190 IF LEFT$(NEWBAL$,1)="$" THEN NEWBAL$=RIGHT$(NEWBAL$,(LEN(NEWBAL$)-1))
200 NEWBAL=VAL(NEWBAL$)
210 PRINT :PRINT :PRINT :PRINT
220 'Total the deposits made but not shown on statement
230 INPUT;"Enter DEPOSITS not shown on statement (Enter 0 to end or REDO to restart):",DEP$:PRINT
240 IF DEP$="" THEN BEEP:GOTO 230
250 IF LEFT$(DEP$,1)="0" THEN 290
260 IF DEP$="redo" OR DEP$="REDO" THEN DEPOSITS=0: PRINT "CLEARED": GOTO 230
270 IF LEFT$(DEP$,1)="$" THEN DEP$=RIGHT$(DEP$,(LEN(DEP$)-1))
280 DEPOSITS=DEPOSITS +VAL(DEP$):GOTO 230
290 PRINT :PRINT :PRINT :PRINT
300 'Total the checks that haven't cleared
310 INPUT;"Enter any CHECKS not returned (Enter 0 to end or REDO to start over):",CHECK$:PRINT
320 IF CHECK$="" THEN BEEP:GOTO 310
330 IF LEFT$(CHECK$,1)="0" THEN 370
340 IF (CHECK$="REDO") OR (CHECK$="redo") THEN CHECKS=0:PRINT "CLEARED":GOTO 310
350 IF LEFT$(CHECK$,1)="$" THEN CHECK$=RIGHT$(CHECK$,(LEN(CHECK$)-1))
360 CHECKS=CHECKS+VAL (CHECK$):GOTO 310
370 PRINT :PRINT
380 'Calculate the checkbook balance
390 BALANCE=NEWBAL+DEPOSITS-CHECKS
400 PRINT "After you have deducted all charges, etc. shown on your statement
410 PRINT USING "your CHECKBOOK BALANCE should be $ ###.##";BALANCE
420 'Does the calculated balance match the checkbook?
430 PRINT :PRINT :INPUT "Does this match your CHECKBOOK BALANCE";ANSWER$
440 IF ANSWER$="" THEN BEEP:GOTO 430
450 'If so, great. Go to END.
460 IF LEFT$(ANSWER$,1)="Y" OR LEFT$(ANSWER$,1)="y" THEN 800
470 'If not, try to find the error
480 PRINT :PRINT "Please check to see if you have deducted all bank charges"
490 PRINT "such as new checks, etc. from your checkbook balance."
500 'Find out how much the balance is off then look for obvious errors of that amount
510 PRINT :INPUT "Enter your CHECKBOOK BALANCE";CHKBKBAL$ :PRINT
520 IF CHKBKBAL$="" THEN BEEP:GOTO 510
530 IF LEFT$(CHKBKBAL$,1)="$" THEN CHKBKBAL$=RIGHT$(CHKBKBAL$,(LEN(CHKBKBAL$)-1))
540 CHKBKBAL=VAL(CHKBKBAL$):DIFFERENCE=BALANCE-CHKBKBAL
550 PRINT :PRINT USING "Your checkbook is out of balance by $ ###.##";DIFFERENCE
560 PRINT "Check to see if there are any checks that have not cleared or "
570 PRINT "deposits not cleared, etc. that are for this amount."
580 PRINT :PRINT :INPUT "Did you find the error";ANSWER$
590 IF ANSWER$="" THEN BEEP:GOTO 570
600 IF LEFT$(ANSWER$,1)="y" OR LEFT$(ANSWER$,1)="Y" THEN 800
610 'The error has not been found so let's refigure the checkbook
620 PRINT :INPUT "Enter your last GOOD BALANCE";GDBAL$ :PRINT
630 IF GDBAL$="" THEN BEEP:GOTO 620
640 IF LEFT$(GDBAL$,1)="$" THEN GDBAL$=RIGHT$(GDBAL$,(LEN(GDBAL$)-1))
650 GDBAL=VAL(GDBAL$)
660 PRINT :PRINT
670 INPUT "Enter all CHECKS since the last good balance (0 to end, REDO to redo)";CHK$:PRINT
680 IF CHK$="" THEN BEEP:GOTO 670
690 IF LEFT$(CHK$,1)="0" THEN 730
700 IF CHK$="REDO" OR CHK$="redo" THEN CHKS=0:PRINT "CLEARED":GOTO 670
710 IF LEFT$(CHK$,1)="$" THEN CHK$=RIGHT$(CHK$,(LEN(CHK$)-1))
720 CHKS=CHKS-VAL(CHK$):GOTO 670
730 PRINT :PRINT :INPUT "Enter all DEPOSITS since last good balance (0 to end)";DEP$
740 IF DEP$="" THEN BEEP:GOTO 730
750 IF LEFT$(DEP$,1)="0" THEN 780
760 IF LEFT$(DEP$,1)="$" THEN DEP$=RIGHT$(DEP$,(LEN(DEP$)-1))
770 DEPS=DEPS+VAL(DEP$):GOTO 730
780 GDBAL=GDBAL+DEPS+CHKS
790 PRINT :PRINT USING "The BALANCE IN YOUR CHECKBOOK should be $ ###.## ";GDBAL
800 IF MAINMENU$="no" OR MAINMENU$="NO" THEN 820
810 CHAIN "mainmenu.mnu"
820 END
OUR CHECKBOOK should be $ ###.## ";GDBAL
800 IF MAINM