This program is a personal finance manager that tracks checking, savings, and loan accounts using string arrays to store formatted transaction records. Transactions are entered in a fixed-format code scheme (two-character type codes such as CD for checking deposit, SW for savings withdrawal, LP for loan payment, followed by MMDDYY date fields and an amount), validated for type, month, day, year, and positive amount before acceptance. The program performs a selection sort on transactions by date, then processes them into three parallel string arrays (A$, B$, C$) with monthly interest compounding applied automatically at month boundaries. Output can be displayed on-screen with paged scrolling or sent to a printer via LPRINT, and files can be saved either with full transaction history or with balances only for a compact end-of-month carry-forward.
Program Analysis
Program Structure
The program is organized as a menu-driven application spanning lines 10–3830. Control flows through a central menu at lines 60–150, branching to five major functional blocks. REMs at key points (lines 60, 160, 370, 960, etc.) are stored in inverse video as section labels, a common ZX81/TS1000 organizational convention.
- Lines 10–50: Initialization, splash screen, and CLS
- Lines 60–150: Menu input and dispatch
- Lines 170–350: New file setup — starting date, balances, interest rates
- Lines 350–940: Transaction entry loop with multi-stage validation
- Lines 970–1060: Selection sort of
T$by date field - Lines 1070–2420: Report array construction and transaction processing
- Lines 2430–3060: Screen display (paged) and optional LPRINT hard copy
- Lines 3080–3280: Save routines (with transactions or balances only)
- Lines 3300–3510: End-of-month interest posting subroutine
- Lines 3530–3650: Month-advance date calculation subroutine
- Lines 3670–3790: Right-hand currency formatting subroutine
- Lines 3800–3830: STOP and auto-run SAVE
Data Model and Transaction Format
All transactions are stored in T$(25,19), a 25-row by 19-character fixed-width string array. Each transaction record encodes its entire meaning positionally:
| Columns | Content |
|---|---|
| 1–2 | Transaction type code (CD, CW, CT, SD, SW, ST, LP) |
| 3–4 | Month (MM) |
| 5–6 | Day (DD) |
| 7–8 | Year (YY) |
| 9–12 | Reference/cheque number or memo field |
| 13–19 | Amount (right-justified by the formatting subroutine) |
The report arrays A$(), B$(), and C$() are 32 characters wide and are dimensioned dynamically at line 1070–1090 to I+27 or I+26 rows, accommodating at most one interest posting line per transaction.
Transaction Type Codes
| Code | Meaning | Effect |
|---|---|---|
| CD | Checking Deposit | Adds to checking balance |
| CW | Checking Withdrawal | Subtracts from checking balance |
| CT | Checking-to-Savings Transfer | Subtracts from checking, adds to savings |
| SD | Savings Deposit | Adds to savings balance |
| SW | Savings Withdrawal | Subtracts from savings balance |
| ST | Savings-to-Checking Transfer | Subtracts from savings, adds to checking |
| LP | Loan Payment | Reduces loan balance |
Validation Logic
Each entered transaction passes through five sequential checks before being accepted. Any failure triggers a rejection screen showing the offending transaction with an underline caret pointing to the invalid field, a 10-second PAUSE 600, and then a branch back to re-entry at line 360.
- Type code must be one of the seven valid codes (lines 430–510)
- Month field (columns 3–4) must be ≤ 12 (line 590)
- Day field (columns 5–6) must be ≤ 31 (line 670) — no per-month validation
- Year field (columns 7–8) must be ≥ the year portion of the statement date
D$(line 750) - Amount field (columns 13 onward) must be > 0 (line 830)
The visual rejection feedback uses PRINT AT to place the transaction text followed by a \''\'' (▀▀) underline at the column corresponding to the specific invalid field — a neat diagnostic technique for a fixed-format entry system.
Sort Algorithm
Lines 970–1050 implement a straightforward O(n²) selection sort, comparing T$(X,3 TO 6) (the MMDD portion of each transaction) as strings. Because months and days are stored as zero-padded two-digit strings, lexicographic comparison is numerically correct. However, the sort does not include the year digits (columns 7–8), so transactions spanning more than one calendar year would not be ordered correctly across year boundaries.
Interest and End-of-Month Processing
The subroutine at line 3300 is called for each transaction and detects when a new month has been crossed by comparing the transaction’s month field against the last-written month in the report array. When a month boundary is detected, subroutine 3530 computes the first day of the next month via a 12-way IF chain (lines 3530–3640), and then lines 3360–3470 post interest entries for all three accounts using the monthly rates CINT, SINT, and LPR (each pre-divided by 1200 at input time to convert annual percentage rate to a monthly decimal). The loan interest compounds the outstanding balance upward rather than deducting a payment, which is the expected behaviour for an accrual posting.
Currency Formatting Subroutine
The subroutine at lines 3670–3790 is called via GOSUB 3670 throughout the program. It receives a value in Z$ and returns a right-justified 8-character currency string. The steps are:
- Convert
Z$to a floatWand round to two decimal places usingINT(W*100+.5)/100 - Fix leading-decimal cases such as
.5→0.5and-.5→-0.5 - If no decimal point exists, append
.00; if only one decimal digit, append0 - Right-justify into an 8-character workspace
W$(1)using the position of the decimal pointKto compute the offset
This is a robust approach for the era, handling negative values and whole numbers correctly, though it will silently overflow for amounts requiring more than 7 characters (e.g., balances ≥ $10,000.00).
Paged Display
Lines 2430–2830 print the three report arrays to screen with manual paging. The variable P tracks the last page break; when L = P+22, the program pauses, clears the screen, reprints the section header lines, increments P, and resumes. This is a clean idiom for handling more rows than fit on one screen without using SCROLL.
Save Routines
Menu option 4 (line 3080) saves the full program state including all arrays with SAVE N$. Menu option 5 (lines 3130–3280) implements a compact “balances only” save: it extracts the final balance of each account from the last rows of the report arrays, collapses all four string arrays to DIM T$(1,1), DIM A$(1,1) etc. to free memory, then saves. On reload, the program restarts at line 10 (due to the GOTO 10 at line 3280) and re-enters the new-file setup with the carried-forward balances pre-populated in E$, F$, G$.
Notable Anomalies and Bugs
- Lines 1540, 1670, 1680 etc.: The transaction processing block (lines 1390–2420) uses
FOR T=1 TO I-1withNEXT Tinside each conditional branch. After the first branch that matches a transaction type, theNEXT TadvancesTand control falls through to the nextIFcheck rather than restarting from the top of the loop. This means each transaction type block only processes transactions of that type in sequence — effectively the structure is seven sequential passes over the array, one per type. This is unconventional and relies on BASIC’s permissiveFOR/NEXTbehavior but is logically functional as long as the sort has already grouped types by date. - Line 750: The year comparison uses
T$(I,7 TO 8)>=D$(5 TO 6).D$is the statement date entered by the user; columns 5–6 ofD$as entered (in MMDDYY format) give the year YY. This works only ifD$is entered in exactly MMDDYY format, which is implied but never documented to the user. - Line 3120: After saving with full transactions, the program jumps to
GOTO 30rather than back to the menu at line 50 or 70, causing the splash screen PRINT to re-execute before the menu. - Lines 3220–3250: Collapsing arrays to
DIM X$(1,1)is a valid memory-recovery technique, but it also destroys all transaction and report data, making this a one-way operation in the session.
Content
Source Code
10 DIM T$(25,19)
20 REM % %T%H%E% %B%A%N%K% %B%O%O%K%S% % % % % % % %
30 PRINT "'':'' : : :'''' : :...: :.... : : : : ' ' ' ''''' % % % % . :% % % % : % : % :: .:: % % :: :: % % % :: .::' % % :: :: % :: % :: .::' % % % % : :% % % % : % % % :% % % % :: :: % :: % :: '::. % % :: :: % % % :: '::. % % % % ' :: :: % :% :: ':: % % % % . :% % % % : % % % % % :: .:: % % % % % % % :: :: % % :: .::' % % % % :: :: % % :: .::' % % % % % : :: :: % % :% % % % % % % % % :: :: % % :: '::. % % % :: :: % % :: '::. % % % % % % ' :% % % % : % % % % % :: ':: % % % % % WRITTEN BY TIM L. WARD MAY 1983"
40 PAUSE 600
50 CLS
60 REM %M%E%N%U% % % % % % % % % % % % % % % % % % %
70 PRINT AT 1,7;"THE BANK BOOKS 1.0",,,AT 3,14;"MENU",,,,,AT 6,6;"PLEASE ENTER NUMBER",,,"1...START NEW FILE",,,"2...ENTER NEW TRANSACTIONS FOR",,TAB 4;"THIS FILE",,,,"3...PRINT AND DISPLAY THIS FILE",,,"4...SAVE THIS FILE WITH TRANS",,,"5...SAVE THIS FILE WITH BAL.ONLY",,"6...END PROGRAM"
80 INPUT M
90 CLS
100 IF M=1 THEN GOTO 170
110 IF M=2 THEN GOTO 360
120 IF M=3 THEN GOTO 970
130 IF M=4 THEN GOTO 3080
140 IF M=5 THEN GOTO 3130
150 IF M=6 THEN GOTO 3810
160 REM %B%E%G%.% %B%A%L%.%/%I%N%T%.% %R%A%T%E% % % %
170 PRINT AT 10,10;"PLEASE ENTER:"
180 PRINT AT 12,7;"BEG. STATEMENT DATE"
190 INPUT D$
200 PRINT AT 12,0;"BEG. BALANCE OF CHECKING ACCOUNT"
210 INPUT E$
220 PRINT AT 12,0;"BEG. BALANCE OF SAVINGS ACCOUNT "
230 INPUT F$
240 PRINT AT 12,0;"BEG. BALANCE OF LOAN ACCOUNT "
250 INPUT G$
260 PRINT AT 12,0;"INTEREST RATE ON CHECKING ACOUNT"
270 INPUT CINT
280 LET CINT=CINT/100/12
290 PRINT AT 12,0;"INTEREST RATE ON SAVINGS ACCOUNT"
300 INPUT SINT
310 LET SINT=SINT/100/12
320 PRINT AT 12,0;"ANNUAL PERCENTAGE RATE ON LOAN "
330 INPUT LPR
340 LET LPR=LPR/100/12
350 FOR I=1 TO 25
360 CLS
370 REM %T%R%A%N%S% %E%D%I%T%/%A%C%C%E%P%T%E%D% % % %
380 PRINT AT 10,10;"PLEASE ENTER:"
390 PRINT AT 12,10;"TRANSACTIONS"
400 PRINT AT 13,10;"''''''''''''''''''''''''"
410 INPUT T$(I)
420 CLS
430 IF T$(I, TO 2)="CD" THEN GOTO 590
440 IF T$(I, TO 2)="CW" THEN GOTO 590
450 IF T$(I, TO 2)="CT" THEN GOTO 590
460 IF T$(I, TO 2)="SD" THEN GOTO 590
470 IF T$(I, TO 2)="SW" THEN GOTO 590
480 IF T$(I, TO 2)="ST" THEN GOTO 590
490 IF T$(I, TO 2)="LP" THEN GOTO 590
500 IF T$(I, TO 3)<>"END" THEN GOTO 520
510 GOTO 950
520 PRINT AT 10,14;"REJECT"
530 PRINT AT 12,5;"TRANSACTION CODE INVALID"
540 PRINT AT 13,5;"''''''''''''''''''''''''''''''''''''''''''''''''"
550 PRINT AT 14,7;T$(I)
560 PRINT AT 15,7;"''''"
570 PAUSE 600
580 GOTO 360
590 IF VAL T$(I,3 TO 4)<=12 THEN GOTO 670
600 PRINT AT 10,14;"REJECT"
610 PRINT AT 12,5;"TRANSACTION MONTH INVALID"
620 PRINT AT 13,5;"''''''''''''''''''''''''''''''''''''''''''''''''''"
630 PRINT AT 14,7;T$(I)
640 PRINT AT 15,9;"''''"
650 PAUSE 600
660 GOTO 360
670 IF VAL T$(I,5 TO 6)<=31 THEN GOTO 750
680 PRINT AT 10,14;"REJECT"
690 PRINT AT 12,5;"TRANSACTION DAY INVALID"
700 PRINT AT 13,5;"''''''''''''''''''''''''''''''''''''''''''''''"
710 PRINT AT 14,7;T$(I)
720 PRINT AT 15,11;"''''"
730 PAUSE 600
740 GOTO 360
750 IF T$(I,7 TO 8)>=D$(5 TO 6) THEN GOTO 830
760 PRINT AT 10,14;"REJECT"
770 PRINT AT 12,5;"TRANSACTION YEAR INVALID"
780 PRINT AT 13,5;"''''''''''''''''''''''''''''''''''''''''''''''''"
790 PRINT AT 14,7;T$(I)
800 PRINT AT 15,13;"''''"
810 PAUSE 600
820 GOTO 360
830 IF VAL T$(I,13 TO )>0 THEN GOTO 910
840 PRINT AT 10,14;"REJECT"
850 PRINT AT 12,5;"TRANSACTION AMOUNT INVALID"
860 PRINT AT 13,5;"''''''''''''''''''''''''''''''''''''''''''''''''''''"
870 PRINT AT 14,7;T$(I)
880 PRINT AT 15,19;"''''''''''''''"
890 PAUSE 600
900 GOTO 360
910 PRINT AT 12,6;"TRANSACTION ACCEPTED"
920 PRINT AT 13,6;"''''''''''''''''''''''''''''''''''''''''"
930 PAUSE 50
940 NEXT I
950 GOTO 50
960 REM %S%O%R%T% % % % % % % % % % % % % % % % % % %
970 FAST
980 FOR X=1 TO I-1
990 FOR S=X+1 TO I
1000 IF T$(X,3 TO 6)<T$(S,3 TO 6) THEN GOTO 1040
1010 LET S$=T$(X)
1020 LET T$(X)=T$(S)
1030 LET T$(S)=S$
1040 NEXT S
1050 NEXT X
1060 REM %F%O%R%M%A%T% %H%E%A%D%I%N%G% %L%I%N%E%S% % %
1070 DIM A$(I+27,32)
1080 DIM B$(I+26,32)
1090 DIM C$(I+26,32)
1100 LET A$(1)="THE BANK BOOKS ACCOUNTS SUMMARY"
1110 LET A$(2,5 TO 28)="CHECKING ACCOUNT SUMMARY"
1120 LET A$(3)="DATE TRANS. AMOUNT BALANCE"
1130 LET A$(4, TO 2)=D$( TO 2)
1140 LET A$(4,3)="-"
1150 LET A$(4,4 TO 5)=D$(3 TO 4)
1160 LET Z$=E$
1170 GOSUB 3670
1180 LET A$(4,25 TO )=Z$
1190 LET B$(1,5 TO 27)="SAVINGS ACCOUNT SUMMARY"
1200 LET B$(2)="DATE TRANS. AMOUNT BALANCE"
1210 LET B$(3, TO 2)=D$( TO 2)
1220 LET B$(3,3)="-"
1230 LET B$(3,4 TO 5)=D$(3 TO 4)
1240 LET Z$=F$
1250 GOSUB 3670
1260 LET B$(3,25 TO )=Z$
1270 LET C$(1,7 TO 26)="LOAN ACCOUNT SUMMARY"
1280 LET C$(2)="DATE AMOUNT BALANCE"
1290 LET C$(3, TO 2)=D$( TO 2)
1300 LET C$(3,3)="-"
1310 LET C$(3,4 TO 5)=D$(3 TO 4)
1320 LET Z$=G$
1330 GOSUB 3670
1340 LET C$(3,25 TO )=Z$
1350 LET A=5
1360 LET B=4
1370 LET C=4
1380 REM %T%R%A%N%S%A%C%T%I%O%N% %P%R%O%C%E%S%S%I%N%G%
1390 FOR T=1 TO I-1
1400 GOSUB 3300
1410 IF T$(T,3 TO 4)>A$(A-1, TO 2) THEN GOSUB 3300
1420 IF T$(T, TO 2)<>"CD" THEN GOTO 1550
1430 LET A$(A, TO 2)=T$(T,3 TO 4)
1440 LET A$(A,3)="-"
1450 LET A$(A,4 TO 5)=T$(T,5 TO 6)
1460 LET A$(A,9 TO 12)=T$(T,9 TO 12)
1470 LET Z$=T$(T,13 TO )
1480 GOSUB 3670
1490 LET A$(A,16 TO 23)=Z$
1500 LET Z$=STR$ (VAL A$(A-1,25 TO )+VAL T$(T,13 TO ))
1510 GOSUB 3670
1520 LET A$(A,25 TO )=Z$
1530 LET A=A+1
1540 NEXT T
1550 IF T$(T, TO 2)<>"CW" THEN GOTO 1680
1560 LET A$(A, TO 2)=T$(T,3 TO 4)
1570 LET A$(A,3)="-"
1580 LET A$(A,4 TO 5)=T$(T,5 TO 6)
1590 LET A$(A,9 TO 12)=T$(T,9 TO 12)
1600 LET Z$=T$(T,13 TO )
1610 GOSUB 3670
1620 LET A$(A,16 TO 23)=Z$
1630 LET Z$=STR$ (VAL A$(A-1,25 TO )-VAL T$(T,13 TO ))
1640 GOSUB 3670
1650 LET A$(A,25 TO )=Z$
1660 LET A=A+1
1670 NEXT T
1680 IF T$(T, TO 2)<>"CT" THEN GOTO 1860
1690 LET A$(A, TO 2)=T$(T,3 TO 4)
1700 LET A$(A,3)="-"
1710 LET A$(A,4 TO 5)=T$(T,5 TO 6)
1720 LET A$(A,9 TO 12)=T$(T,9 TO 12)
1730 LET Z$=T$(T,13 TO )
1740 GOSUB 3670
1750 LET A$(A,16 TO 23)=Z$
1760 LET Z$=STR$ (VAL A$(A-1,25 TO )-VAL T$(T,13 TO ))
1770 GOSUB 3670
1780 LET A$(A,25 TO )=Z$
1790 LET B$(B, TO 23)=A$(A, TO 23)
1800 LET Z$=STR$ (VAL B$(B-1,25 TO )+VAL T$(T,13 TO ))
1810 GOSUB 3670
1820 LET B$(B,25 TO )=Z$
1830 LET A=A+1
1840 LET B=B+1
1850 NEXT T
1860 IF T$(T, TO 2)<>"SD" THEN GOTO 1990
1870 LET B$(B, TO 2)=T$(T,3 TO 4)
1880 LET B$(B,3)="-"
1890 LET B$(B,4 TO 5)=T$(T,5 TO 6)
1900 LET B$(B,9 TO 12)=T$(T,9 TO 12)
1910 LET Z$=T$(T,13 TO )
1920 GOSUB 3670
1930 LET B$(B,16 TO 23)=Z$
1940 LET Z$=STR$ (VAL B$(B-1,25 TO )+VAL T$(T,13 TO ))
1950 GOSUB 3670
1960 LET B$(B,25 TO )=Z$
1970 LET B=B+1
1980 NEXT T
1990 IF T$(T, TO 2)<>"SW" THEN GOTO 2120
2000 LET B$(B, TO 2)=T$(T,3 TO 4)
2010 LET B$(B,3)="-"
2020 LET B$(B,4 TO 5)=T$(T,5 TO 6)
2030 LET B$(B,9 TO 12)=T$(T,9 TO 12)
2040 LET Z$=T$(T,13 TO )
2050 GOSUB 3670
2060 LET B$(B,16 TO 23)=Z$
2070 LET Z$=STR$ (VAL B$(B-1,25 TO )-VAL T$(T,13 TO ))
2080 GOSUB 3670
2090 LET B$(B,25 TO )=Z$
2100 LET B=B+1
2110 NEXT T
2120 IF T$(T, TO 2)<>"ST" THEN GOTO 2300
2130 LET B$(B, TO 2)=T$(T,3 TO 4)
2140 LET B$(B,3)="-"
2150 LET B$(B,4 TO 5)=T$(T,5 TO 6)
2160 LET B$(B,9 TO 12)=T$(T,9 TO 12)
2170 LET Z$=T$(T,13 TO )
2180 GOSUB 3670
2190 LET B$(B,16 TO 23)=Z$
2200 LET Z$=STR$ (VAL B$(B-1,25 TO )-VAL T$(T,13 TO ))
2210 GOSUB 3670
2220 LET B$(B,25 TO )=Z$
2230 LET A$(A, TO 23)=B$(B, TO 23)
2240 LET Z$=STR$ (VAL A$(A-1,25 TO )+VAL T$(T,13 TO ))
2250 GOSUB 3670
2260 LET A$(A,25 TO )=Z$
2270 LET A=A+1
2280 LET B=B+1
2290 NEXT T
2300 IF T$(T, TO 2)<>"LP" THEN GOTO 2430
2310 LET C$(C, TO 2)=T$(T,3 TO 4)
2320 LET C$(C,3)="-"
2330 LET C$(C,4 TO 5)=T$(T,5 TO 6)
2340 LET Z$=T$(T,13 TO )
2350 GOSUB 3670
2360 LET C$(C,16 TO 23)=Z$
2370 LET Z$=STR$ (VAL C$(C-1,25 TO )-VAL T$(T,13 TO ))
2380 GOSUB 3670
2390 LET C$(C,25 TO )=Z$
2400 LET C=C+1
2410 NEXT T
2420 SLOW
2430 LET P=0
2440 FOR L=1 TO A
2450 IF L=P+22 THEN GOTO 2490
2460 PRINT A$(L)
2470 NEXT L
2480 GOTO 2550
2490 PAUSE 600
2500 CLS
2510 PRINT A$(2)
2520 PRINT A$(3)
2530 LET P=P+22
2540 GOTO 2460
2550 PAUSE 600
2560 CLS
2570 LET P=0
2580 FOR L=1 TO B
2590 IF L=P+22 THEN GOTO 2630
2600 PRINT B$(L)
2610 NEXT L
2620 GOTO 2690
2630 PAUSE 600
2640 CLS
2650 PRINT B$(1)
2660 PRINT B$(2)
2670 LET P=P+22
2680 GOTO 2600
2690 PAUSE 600
2700 CLS
2710 LET P=0
2720 FOR L=1 TO C
2730 IF L=P+22 THEN GOTO 2770
2740 PRINT C$(L)
2750 NEXT L
2760 GOTO 2830
2770 PAUSE 600
2780 CLS
2790 PRINT C$(1)
2800 PRINT C$(2)
2810 LET P=P+22
2820 GOTO 2740
2830 PAUSE 600
2840 CLS
2850 PRINT AT 12,0;"DO YOU WANT HARD COPY (YES/NO)"
2860 INPUT M$
2870 CLS
2880 SLOW
2890 IF M$="NO" THEN GOTO 70
2900 FAST
2910 LPRINT TAB 5;"TRANSACTIONS ACCEPTED"
2920 FOR L=1 TO T
2930 LPRINT TAB 6;T$(L)
2940 NEXT L
2950 LPRINT
2960 FOR L=1 TO A
2970 LPRINT A$(L)
2980 NEXT L
2990 FOR L=1 TO B
3000 LPRINT B$(L)
3010 NEXT L
3020 FOR L=1 TO C
3030 LPRINT C$(L)
3040 NEXT L
3050 SLOW
3060 GOTO 70
3070 REM %S%A%V%E% %R%O%U%T%I%N%E% % % % % % % % % % %
3080 PRINT AT 10,5;"STEP 1 ENTER FILE NAME";AT 12,5;"STEP 2 SET TAPE TO RECORD";AT 14,5;"STEP 3 PRESS ""ENTER"""
3090 INPUT N$
3100 CLS
3110 SAVE N$
3120 GOTO 30
3130 PRINT AT 10,5;"STEP 1 ENTER FILE NAME";AT 12,5;"STEP 2 SET TAPE TO RECORD";AT 14,5;"STEP 3 PRESS ""ENTER"""
3140 INPUT N$
3150 CLS
3160 FAST
3170 GOSUB 3320
3180 LET D$=A$(A,1 TO 2)+A$(A,4 TO 5)+T$(T,7 TO 8)
3190 LET E$=A$(A,25 TO )
3200 LET F$=B$(B,25 TO )
3210 LET G$=C$(C,25 TO )
3220 DIM T$(1,1)
3230 DIM A$(1,1)
3240 DIM B$(1,1)
3250 DIM C$(1,1)
3260 SAVE N$
3270 SLOW
3280 GOTO 10
3290 REM %E%N%D% %O%F% %M%O%N%T%H% %R%O%U%T%I%N%E% % %
3300 IF T$(T,3 TO 4)>A$(A-1, TO 2) THEN GOTO 3320
3310 RETURN
3320 GOSUB 3530
3330 LET A$(A, TO 5)=Y$
3340 LET B$(B, TO 5)=Y$
3350 LET C$(C, TO 5)=Y$
3360 LET AMT=VAL A$(A-1,25 TO )
3370 LET Z$=STR$ (AMT+(AMT*CINT))
3380 GOSUB 3670
3390 LET A$(A,25 TO )=Z$
3400 LET AMT=VAL B$(B-1,25 TO )
3410 LET Z$=STR$ (AMT+(AMT*SINT))
3420 GOSUB 3670
3430 LET B$(B,25 TO )=Z$
3440 LET AMT=VAL C$(C-1,25 TO )
3450 LET Z$=STR$ (AMT+(AMT*LPR))
3460 GOSUB 3670
3470 LET C$(C,25 TO )=Z$
3480 LET A=A+1
3490 LET B=B+1
3500 LET C=C+1
3510 RETURN
3520 REM %E%N%D% %O%F% %M%O%N%T%H% %D%A%T%E% %R%O%U%T%
3530 IF A$(A-1, TO 2)="01" THEN LET Y$="02-01"
3540 IF A$(A-1, TO 2)="02" THEN LET Y$="03-01"
3550 IF A$(A-1, TO 2)="03" THEN LET Y$="04-01"
3560 IF A$(A-1, TO 2)="04" THEN LET Y$="05-01"
3570 IF A$(A-1, TO 2)="05" THEN LET Y$="06-01"
3580 IF A$(A-1, TO 2)="06" THEN LET Y$="07-01"
3590 IF A$(A-1, TO 2)="07" THEN LET Y$="08-01"
3600 IF A$(A-1, TO 2)="08" THEN LET Y$="09-01"
3610 IF A$(A-1, TO 2)="09" THEN LET Y$="10-01"
3620 IF A$(A-1, TO 2)="10" THEN LET Y$="11-01"
3630 IF A$(A-1, TO 2)="11" THEN LET Y$="12-01"
3640 IF A$(A-1, TO 2)="12" THEN LET Y$="01-01"
3650 RETURN
3660 REM %R%I%G%H%T%-%H%A%N%D% %J%U%S%T%I%F%Y% % % % %
3670 DIM W$(1,8)
3680 LET W=VAL Z$
3690 LET X$=STR$ (INT (W*100+.5)/100)
3700 IF X$(1)="." THEN LET X$="0"+X$
3710 IF LEN X$>1 THEN IF X$(1 TO 2)="-." THEN LET X$="-0"+X$(2 TO )
3720 FOR K=1 TO LEN X$
3730 IF X$(K)="." THEN GOTO 3760
3740 NEXT K
3750 LET X$=X$+".00"
3760 IF K=LEN X$-1 THEN LET X$=X$+"0"
3770 LET W$(1,(7-K) TO )=X$
3780 LET Z$=W$(1)
3790 RETURN
3800 REM %P%R%O%G%R%A%M% %S%T%O%P% % % % % % % % % % %
3810 STOP
3820 SAVE "1000%2"
3830 RUN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

