Balance your Checkbook...

by Charles Bachand

For this issue of A.N.A.L.O.G., I received a request for a Personal Finance program. The program that I developed can help you keep track of all the checks that you write in a month.

One of the nice features of this program, and one that should be added to any program that might be used by people not familiar with computers, is extensive error checking. Every effort should be made to see that your programs cannot bomb out. After all, how would you like it if while demonstrating your latest program, a letter was inadvertently typed where a number was expected? You would then have to explain what went wrong, when it could have been avoided. Wouldn't it be nice if the program simply asked you to type another response to the question. Hopefully, my program will give you some ideas along those lines.

The program is essentially self explanatory. The check numbers must be integers greater than zero. Month and Day must also be integers greater than zero. However, Month cannot be greater than 12, and Day cannot be greater than 31. "CHECK TO" can store any string up  to 15 characters long. If you type the letter "D" instead of a name, the routine assumes that you wish to make a deposit. When the program asks you YES/NO type questions, it will only accept "Y" and "N" as valid answers.

This program by no means contains everything you would want in a Check Book Balancer. It would be nice to be able to save and retrieve the data from cassette or disk. Being able to sort the data, or to return to input mode after the data was printed to make corrections or deletions would also be a nice feature. It is up to you to build on this program and make it better.

EXPLANATION OF ROUTINES:
LINES 100-300
Dimensions and initializes data. Prints instructions and sets ADD mode option. Accepts initial balance for month.

LINES 500-600
Accepts individual check data with error checking.

LINES 1000-2000
Asks for Output file or device name and prints out report.

LINES 4000-4010
Prints X four columns wide with leading zeros.

LINES 5000-5020
Accepts only "Y" or "N" from the keyboard and echoes it to the screen. If answer is "Y" then returns 1 in X, otherwise returns 0.

LINES 6000-6050
Prints X as dollars and cents. Dollars in five columns with leading blanks, ".", cents in two columns, and if minus, a trailing "+". Example,
" 199.50-".

LINE 5500
Same as above, except that dollars are printed with leading dollar sign
$ instead of leading blanks. Example, "$199.50-".

LINES 7000-7020
Prints data in format "mm/dd". Example,
"04/09".

LINES 8000-8010
Inputs dollar amounts and divides by 100 if ADD mode in use. Returns value in X.

LINE 9000
Prints bars for various headings.