Atari reckons with personal finance
The recent economic recession has brought home to the average person how important it is to be aware of personal finance. The issues of uncertain investment returns, inflation and unreasonable mortgage rates are complex, and most of us are not financial professionals with access to the tables and charts that can ease the pain of complicated mathematical calculations. If you're like me, you lapse into a funk when brought face to face with an algebraic equation involving "principal, interest and time."
Knowing that my Atari 800 would not be the least bit fazed by such a confrontation, I collected a series of financial equations, wrote a few subroutines, added a touch of color, and came up with the following menu-driven program. While it won't solve your financial dilemmas, it might make struggles less burdensome.
The program opens with an invitation to choose one of several options: "WHAT WILL MY INVESTMENT BE WORTH?"; "VALUE OF REGULAR SAVINGS"; "ANNUITY INCOME"; and so on. One menu choice leads the user to a brief description of how each option can be used. For example, "DEVALUATION OF THE $ BY INFLATION" not only determines the effect of inflation on your savings, it also can calculate the depreciation of a piece of property, such as the family car. By using this option in conjunction with "GROWTH RATE OF MONEY," you can obtain an accurate picture of the actual increase (or decrease) in the value of an investment over a given period of time.
The program is written in very basic BASIC. It is simply a series of subroutines tied together by a menu. The calculating routines (lines 100, 300, 500, 700, 900, and 1100) in the program can be changed to meet your specific requirements. Osborne/McCraw-Hill's Some Common BASIC Programs (Atari Edition) contains a number of programs you may find useful. TAB Books' The Most Popular Subroutines in BASIC is also crammed full of usable formulas.
Lines 0-25: Give the program a title
Lines 30-95: Menu information; requests user input and directs the program to the chosen menu option. The program error traps each INPUT line (see lines 95 and 120, for example).
Lines 100-195: This section does the work involved in the first menu choice. After requesting user input, it computes the figures you need (lines 155, 160 and 175) and prints the answer on the screen (lines 170 and 180).
Line 190: This subroutine (GOSUB 3000) asks the user to stay with this choice, ask for further directions, or return to the main menu. All of the routines are set up in virtually the same way.
Line 2000; This final menu selectisn (menu choice 7: line 85) provides you with details about how to use each option, and suggests further applications. If you don't want this section in your program, eliminate line 85, omit 2000 from line 95, and eliminate lines 2000 to 2285.
Lines 3000-3135: After each calculation, these two subroutines lead the user back into the program to continue with the function, get more information or return to the main menu. If you choose to eliminate the "FURTHER DETAIL" routine (lines 2000-2285), then lines 3010, 3030, 3110 and 3130 should be omitted and lines 3015, 3035 and 3135 changed.
Requires 16K RAM
Listing: MONEYMAT.BAS Download