Checkbook, Income Tax, Budget Organizer

Developer(s): Al Bandy
Date: 1982
Type: Program
Platform(s): TS 1000
Tags: Finance, Home

This program is a checkbook, income tax, and budget organizer for up to 91 transactions. It manages parallel arrays — T$(J,10) for payee names, D$(J,8) for dates, A(J) for amounts, E(J) for cleared/outstanding status, L(J) for ledger column assignment, N(J) for check numbers, and Q$(15,15) for up to 15 user-defined ledger column titles. The program supports cassette save/load with a user-supplied date as the filename, and lines 1–5 serve as a “do not RUN” splash screen warning that running the program fresh would overwrite loaded data. A notable currency-formatting subroutine at line 4800 pads amounts to always display two decimal places using integer arithmetic to avoid floating-point rounding errors.


Program Structure

The program is divided into well-separated functional blocks navigated from a central menu at line 200. Lines 1–5 form a deliberate trap: if the user RUNs the program instead of GOTOing line 10 or loading saved data, a warning is printed and execution STOPs before any arrays are created, preserving previously loaded data. Lines 10–18 initialize all arrays and are only reached by a deliberate GOTO 10 or on first load. The main menu at 200–430 dispatches to eight numbered functions plus a save/end option.

Line rangeFunction
1–5Anti-RUN splash / warning
10–32Array initialisation and title screen
190–430Main menu and dispatcher
500–580Function 1: Define ledger column titles
600–704Function 2: Enter checks/deposits
705–740Function 3: Totals summary
1000–1105Function 8: Balance checkbook
1300–1495Function 9: Correct entries
1500–1660Function 0: Save to cassette / End
2100–2160Subroutine: Display single entry detail
2200–2340Subroutine: Enter one check/deposit
2400–2590Subroutines: Sum all checks / all deposits
2600–2795Subroutines: Sum recorded (cleared) checks / deposits
3000–3120Subroutine: Mark checks as returned
3200–3340Subroutine: Mark deposits as credited
3400–3540Function 6: List by payee name
3600–3740Function 4: List by line number range
3800–4010Function 5: List by check number range
4100–4320Function 7: List by ledger column
4400–4440Subroutine: “Press ENTER to return” pause
4500–4530Subroutine: Single-key input into U$
4600–4630Subroutine: Print one-line check summary row
4700–4730Subroutine: Print column header
4800–4850Subroutine: Format and print currency amount from P
4900–4965Subroutine: List active ledger column titles

Data Model

All transaction data is stored in parallel arrays dimensioned at line 10–16 with F=91 giving 91 slots. The payee field T$(J) doubles as a sentinel: an empty string (10 spaces) marks the end of the list, and the literal string "DEPOSIT " (padded to 10 characters) distinguishes deposits from checks. The E(J) array is a boolean flag: 0 = outstanding, 1 = recorded/cleared.

  • T$(F,10) — payee name, 10 chars, also type discriminator
  • D$(F,8) — date string, 8 chars
  • A(F) — amount in pounds/dollars as a real number
  • N(F) — check number
  • L(F) — ledger column index (1–15)
  • E(F) — cleared flag (0=outstanding, 1=returned/credited)
  • Q$(15,15) — ledger column titles, 15 chars each

Key BASIC Idioms

The single-key input subroutine at 4500 uses the classic flush-then-wait pattern: it first loops until INKEY$ is empty (flushing any held key), then waits for a fresh keypress, then captures it into U$. SLOW/FAST mode is toggled around the wait to ensure the display is active during keyboard polling.

The string padding idiom at lines 3431–3434 pads a user-entered name to exactly 10 characters by appending spaces one at a time in a loop, enabling exact string comparison against the fixed-width T$(J) entries.

The program uses a sequential scan for nearly all lookups — iterating J from 1 upward until an empty slot is found — rather than maintaining a count variable, keeping the code simple at the cost of O(n) traversal time.

Currency Formatting Subroutine (line 4800)

This subroutine accepts a value in P and prints it as a dollar amount with exactly two decimal places, working around ZX BASIC’s tendency to display trailing zeroes inconsistently:

  1. Round to nearest cent: P = INT((P*100)+0.5)/100
  2. If P is a whole number, print $P.00 and return.
  3. If 10*P is a whole number (one decimal place), print $P0 and return.
  4. Otherwise print $P directly (already has two decimal places).

This avoids floating-point display artifacts without using string manipulation, a common technique in Sinclair BASIC finance programs.

Notable Techniques and Bugs

The check-number listing routine (Function 5, lines 3880–3980) contains dead code: line 3950 (GOTO 3990) is unreachable because the only way to reach it would be to fall through from line 3930’s GOTO 3957, but line 3940 already branches away. The GOTO 3950 path is never taken.

Function 7 (ledger column totals, lines 4100–4320) contains a bug: the loop at 4230–4290 exits via GOTO 4300 when the end-of-data sentinel is found, but line 4300 does not exist. Execution falls through to line 4304 where totals are printed, which happens to work correctly, but only because the missing target causes execution to continue sequentially. However, lines 4278 (IF G>17 THEN GOTO 4210) jump back to the CLS/header sequence but do not reset G to zero, meaning the pagination condition triggers every subsequent entry after the first page break.

The REM at line 18 notes that changing the Q$ dimension at line 17 requires a corresponding change at line 4940, where the loop over ledger titles terminates with IF I=15 THEN RETURN — a hard-coded maximum that must match the first dimension of Q$.

The SAVE C$ at line 1610 saves the entire program along with its variable arrays (including all transaction data) under the user-supplied date string as the filename — a simple but effective versioning strategy for iterative cassette-based data storage.

Content

Appears On

Related Products

Ten jobs in a menu-driven format. Checks and deposits are totaled and itemized under user-defined categories for budget planning and...

Related Articles

Related Content

Image Gallery

Source Code

   1 PRINT AT 9,6;"%D%O% %N%O%T% %H%I%T% %-%R%U%N%-"
   2 PRINT AT 11,3;"%Y%O%U% %H%A%V%E% %L%O%S%T% %D%A%T%A% %S%I%N%C%E"
   3 PRINT AT 13,4;"%L%O%A%D%I%N%G% %F%R%O%M% %C%A%S%S%E%T%T%E"
   4 PRINT AT 16,3;"%R%E%L%O%A%D% %A%N%D% %U%S%E% %-%G%O%T%O% %5%0%-"
   5 STOP 
  10 LET F=91
  11 DIM T$(F,10)
  12 DIM D$(F,8)
  13 DIM A(F)
  14 DIM E(F)
  15 DIM L(F)
  16 DIM N(F)
  17 DIM Q$(15,15)
  18 REM %I%F% %C%H%A%N%G%E% %1%7% %T%H%E%N% %M%U%S%T% % % %A%L%S%O% %C%H%A%N%G%E% %4%9%4%0
  20 PRINT AT 4,4;"%C%H%E%C%K%B%O%O%K%,% %I%N%C%O%M%E% %T%A%X%,"         
  21 PRINT AT 7,5;"%A%N%D% %B%U%D%G%E%T% %O%R%G%A%N%I%Z%E%R"
  25 PRINT AT 11,8;"COPYRIGHT 1982"
  27 PRINT AT 13,13;"BY"
  28 PRINT AT 15,10;"AL BANDY"
  29 PRINT 
  30 PRINT "  %Z%X%-%P%A%N%D%I%N%G%,%L%T%D%.  P.O.BOX 25"
  31 PRINT TAB 8;"NEWTON,NC  28658"
  32 STOP 
 190 FAST 
 200 CLS 
 210 PRINT AT 4,13;"%M%E%N%U"
 260 PRINT AT 6,0;"1-ESTABLISH LEDGER COLUMN TITLES2-ENTER CHECKS OR DEPOSITS      3-TOTALS"
 263 PRINT "4-LIST CHECKS BY LINE NUMBERS   5-LIST CHECKS BY CHECK NUMBERS  6-LIST CHECKS BY -TO WHOM-      7-LIST CHECKS BY COLUMN TOTALS  8-BALANCE CHECKBOOK"
 269 PRINT "9-CORRECT CHECKS OR DEPOSITS    0-SAVE ON TO TAPE OR %E%N%D"
 290 PRINT AT 17,0;"%W%H%I%C%H% %F%U%N%C%T%I%O%N% %D%O% %Y%O%U% %N%E%E%D% %?       (ENTER BY NUMBER)"
 310 GOSUB 4500
 320 IF U$="1" THEN GOTO 500
 330 IF U$="2" THEN GOTO 600
 340 IF U$="3" THEN GOTO 705
 350 IF U$="4" THEN GOTO 3600
 360 IF U$="5" THEN GOTO 3800
 370 IF U$="6" THEN GOTO 3400
 380 IF U$="7" THEN GOTO 4100
 390 IF U$="8" THEN GOTO 1000
 400 IF U$="9" THEN GOTO 1300
 410 IF U$="0" THEN GOTO 1500
 430 GOTO 200
 500 CLS 
 520 PRINT "THIS PROGRAM ALLOWS FOR CHECKS   AND DEPOSITS TO BE LISTED UNDER A LEDGER COLUMN,SUCH AS HOME    EXPENSES,CONTRIBUTIONS,ETC."
 525 PRINT "%H%O%W% %M%A%N%Y% %C%O%L%U%M%N%S% %W%I%L%L% %Y%O%U% %N%E%E%D% %? %M%A%X%.%O%F% %1%5"
 528 INPUT R
 530 FOR I=1 TO R
 533 CLS 
 536 IF Q$(I)<>"               " THEN GOTO 555
 540 PRINT "WHAT IS THE TITLE OF"
 541 PRINT "  LEDGER LINE ";I;
 543 INPUT Q$(I)
 550 NEXT I
 552 GOTO 200
 555 PRINT "LEDGER LINE ";I
 556 PRINT "  IS ALREADY FOR ";Q$(I)
 560 PRINT "%D%O% %Y%O%U% %W%A%N%T% %T%O% %C%H%A%N%G%E% %I%T%(%Y% %O%R% %N%)"
 565 GOSUB 4500
 570 IF U$="Y" THEN GOTO 540
 575 NEXT I
 580 GOTO 200
 600 CLS 
 620 PRINT "THIS PROGRAM ENTERS CHECKS OR    DEPOSITS INTO MEMORY. TO ENTER  DEPOSITS,JUST TYPE -DEPOSIT-    WHEN ASKED -TO WHOM-."
 640 LET J=0
 650 LET J=J+1
 655 IF T$(J)<>"          " THEN GOTO 650
 658 LET J=J-1
 660 IF J=0 THEN GOTO 667
 662 GOSUB 4700
 663 IF J=F-2 THEN PRINT "%T%H%I%S% %I%S% %T%H%E% %L%A%S%T% %C%H%E%C%K%,% %T%H%E      %M%E%M%O%R%Y% %I%S% %F%U%L%L%.% %S%E%E% %I%N%S%R%U%C%T%I%O%N%S %F%O%R% %C%L%O%S%I%N%G% %P%R%O%C%E%D%U%R%E%."
 665 GOSUB 4600
 667 PRINT 
 668 LET J=J+1
 670 GOSUB 2200
 672 CLS 
 674 GOSUB 2100
 676 PRINT 
 680 PRINT "%E%N%T%E%R% %A%N%O%T%H%E%R% %L%I%N%E% %?%(%Y% %O%R% %N%)"
 690 GOSUB 4500
 700 IF U$="Y" THEN GOTO 650
 705 CLS 
 710 GOSUB 2400
 715 PRINT 
 720 GOSUB 2500
 725 LET P=Y-Z
 728 PRINT 
 730 PRINT "--BALANCE=";
 735 GOSUB 4800
 740 GOTO 4400
 1000 CLS 
 1020 PRINT "THIS PORTION OF THE PROGRAM WILL AID IN BALANCING YOUR CHECKBOOK TO MATCH THE STATEMENT FROM THE BANK."
 1030 GOSUB 3000
 1050 GOSUB 3200
 1070 GOSUB 2600
 1075 PRINT 
 1080 GOSUB 2700
 1082 PRINT 
 1085 LET P=Y-Z
 1090 PRINT "YOUR STATEMENT"
 1091 PRINT "  SHOULD READ=";
 1100 GOSUB 4800
 1105 GOTO 4400
 1300 CLS 
 1320 PRINT "THIS IS A PROGRAM TO CORRECT     CHECKS OR DEPOSITS."
 1340 PRINT 
 1350 PRINT "%W%H%I%C%H% %L%I%N%E% %N%U%M%B%E%R% %I%S% %I%N%C%O%R%R%E%C%T% %?"
 1355 INPUT J
 1360 CLS 
 1361 PRINT "%W%H%I%C%H% %D%A%T%A% %I%S% %I%N%C%O%R%R%E%C%T% %(%B%Y% %N%O%.%)"
 1363 PRINT "LINE ";J
 1365 PRINT "1-%T%O% %W%H%O%M-";T$(J)
 1366 PRINT "2-%C%H%E%C%K% %N%O%.-";N(J)
 1367 PRINT "3-%D%A%T%E-";D$(J)
 1368 LET P=A(J)
 1370 PRINT "4-%A%M%O%U%N%T-";
 1372 GOSUB 4800
 1373 PRINT 
 1382 IF L(J)=0 THEN LET L(J)=1
 1384 PRINT "5-%L%E%D%G%E%R-";L(J);" %F%O%R ";Q$(L(J))
 1385 IF E(J)=1 THEN PRINT "6-%I%S% %I%T-RECORDED ?"
 1386 IF E(J)<>1 THEN PRINT "6-%I%S% %I%T-OUTSTANDING ?"
 1389 PRINT "7-NONE ;RETURN TO MENU"
 1390 GOSUB 4500
 1395 PRINT 
 1396 PRINT "%E%N%T%E%R% %T%H%E% %C%O%R%R%E%C%T% %D%A%T%A"
 1400 IF U$="1" THEN INPUT T$(J)
 1401 IF U$="2" THEN INPUT N(J)
 1402 IF U$="3" THEN INPUT D$(J)
 1403 IF U$="4" THEN INPUT A(J)
 1405 IF U$="5" THEN INPUT L(J)
 1406 IF U$="6" THEN GOTO 1491
 1408 IF U$="7" THEN GOTO 200
 1410 GOTO 1360
 1491 PRINT "%I%S% %T%H%I%S% %L%I%N%E% %O%U%T%S%T%A%N%D%I%N%G% %?"
 1492 GOSUB 4500
 1493 IF U$="N" THEN LET E(J)=1
 1494 IF U$="Y" THEN LET E(J)=0
 1495 GOTO 1360
 1500 CLS 
 1510 PRINT "WHICH FUNCTION DO YOU NEED ?"
 1520 PRINT "  1-RETURN TO MENU"
 1525 PRINT "  2-SAVE ON TO CASSETTE"
 1530 PRINT "  3-END PROGRAM"
 1540 GOSUB 4500
 1550 IF U$="1" THEN GOTO 200
 1551 IF U$="2" THEN GOTO 1570
 1552 IF U$="3" THEN GOTO 1630
 1560 GOTO 1500
 1570 PRINT "THE PROGRAM AND DATA WILL BE     SAVED TOGETHER ON A CASSETTE.   THE DATE WILL BE USED AS THE    NAME TO PREVENT CONFUSION AS    MORE CHECKS ARE ADDED AND       STORED."
 1575 PRINT "SAVING WILL BEGIN AS DATE IS     ENTERED."
 1580 PRINT 
 1590 PRINT "%W%H%A%T% %I%S% %T%O%D%A%Y%S% %D%A%T%E% %?"
 1600 INPUT C$
 1610 SAVE C$
 1630 PRINT "%T%H%E% %P%R%O%G%R%A%M% %H%A%S% %E%N%D%E%D%."
 1640 PRINT 
 1650 PRINT "TYPE %G%O%T%O% %5%0 IF NEED TO CONTINUE"
 1660 STOP 
 2100 CLS 
 2101 PRINT AT 5,3;"LINE ";J
 2102 IF T$(J)<>"DEPOSIT   " THEN PRINT " CHECK NO.";N(J)
 2105 IF T$(J)<>"DEPOSIT   " THEN PRINT "TO- ";
 2108 PRINT T$(J)
 2110 PRINT "DATE-";D$(J)
 2115 LET P=A(J)
 2120 GOSUB 4800
 2122 PRINT 
 2123 IF L(J)=0 THEN RETURN 
 2125 PRINT "LEDGER LINE ";L(J);" ";Q$(L(J))
 2130 IF E(J)=0 THEN PRINT "---OUTSTANDING"
 2140 IF E(J)=1 THEN PRINT "---RETURNED"
 2147 RETURN 
 2150 PRINT AT 21,0;"%P%R%E%S%S% %-%E%N%T%E%R%-% %T%O% %C%O%N%T%.% %L%I%S%T%I%N%G"
 2155 INPUT H$
 2160 CLS 
 2170 RETURN 
 2200 PRINT "LINE NUMBER ";J
 2205 PRINT "TO WHOM ? ";
 2210 INPUT T$(J)
 2220 PRINT T$(J)
 2230 IF T$(J)="DEPOSIT   " THEN GOTO 2260
 2240 PRINT "CHECK NUMBER ? ";
 2250 INPUT N(J)
 2255 PRINT N(J)
 2260 PRINT "WHAT IS THE DATE ? ";
 2270 INPUT D$(J)
 2275 PRINT D$(J)
 2280 PRINT "WRITTEN FOR HOW MUCH ?=";
 2290 INPUT A(J)
 2310 CLS 
 2315 GOSUB 4700
 2320 GOSUB 4600
 2322 PRINT 
 2324 GOSUB 4900
 2326 PRINT 
 2328 PRINT "WHICH LEDGER LINE ?"
 2330 INPUT L(J)
 2340 RETURN 
 2400 LET J=0
 2420 LET Z=0
 2430 LET J=J+1
 2440 IF T$(J)="          " THEN GOTO 2475
 2450 IF T$(J)="DEPOSIT   " THEN GOTO 2430
 2460 LET Z=Z+A(J)
 2470 GOTO 2430
 2475 LET P=Z
 2480 PRINT "TOTAL OF CHECKS=";
 2485 GOSUB 4800
 2490 RETURN 
 2500 LET J=0
 2520 LET Y=0
 2530 LET J=J+1
 2540 IF T$(J)="          " THEN GOTO 2575
 2550 IF T$(J)<>"DEPOSIT   " THEN GOTO 2530
 2560 LET Y=Y+A(J)
 2570 GOTO 2530
 2575 LET P=Y
 2580 PRINT "TOTAL OF DEPOSITS=";
 2585 GOSUB 4800
 2590 RETURN 
 2600 LET Z=0
 2620 LET J=0
 2630 LET J=J+1
 2640 IF T$(J)="          " THEN GOTO 2685
 2650 IF T$(J)="DEPOSIT   " THEN GOTO 2630
 2660 IF E(J)=0 THEN GOTO 2630
 2670 LET Z=Z+A(J)
 2680 GOTO 2630
 2685 LET P=Z
 2690 PRINT "TOTAL OF RECORDED"
 2691 PRINT "  CHECKS=";
 2692 GOSUB 4800
 2695 RETURN 
 2700 LET Y=0
 2720 LET J=0
 2730 LET J=J+1
 2740 IF T$(J)="          " THEN GOTO 2785
 2750 IF T$(J)<>"DEPOSIT   " THEN GOTO 2730
 2760 IF E(J)=0 THEN GOTO 2730
 2770 LET Y=Y+A(J)
 2780 GOTO 2730
 2785 LET P=Y
 2790 PRINT "TOTAL OF RECORDED"
 2791 PRINT "  DEPOSITS=";
 2792 GOSUB 4800
 2795 RETURN 
 3000 PRINT "%E%N%T%E%R% %T%H%E% %C%H%E%C%K% %N%U%M%B%E%R%S% %R%E%T%U%R%N%E%D %E%N%T%E%R% %-%0%-% %W%H%E%N% %F%I%N%I%S%H%E%D%."
 3030 INPUT I
 3035 PRINT I;",";
 3040 IF I=0 THEN RETURN 
 3050 LET J=0
 3060 LET J=J+1
 3070 IF T$(J)="          " THEN GOTO 3110
 3080 IF N(J)=I THEN LET E(J)=1
 3090 IF N(J)=I THEN GOTO 3030
 3100 GOTO 3060
 3110 PRINT 
 3115 PRINT "THAT CHECK HAS NOT BEEN WRITTEN."
 3120 GOTO 3030
 3200 CLS 
 3210 PRINT "%N%O%W% %T%O% %N%O%T%E% %D%E%P%O%S%I%T%S%."
 3220 LET J=0
 3230 LET J=J+1
 3240 IF T$(J)="          " THEN GOTO 3320
 3250 IF T$(J)<>"DEPOSIT   " THEN GOTO 3230
 3260 IF E(J)=1 THEN GOTO 3230
 3270 GOSUB 2100
 3280 PRINT AT 20,0;"%H%A%S% %T%H%I%S% %D%E%P%O%S%I%T% %B%E%E%N% %C%R%E%D%I%T%E%D% %?"
 3290 GOSUB 4500
 3300 IF U$="Y" THEN LET E(J)=1
 3310 GOTO 3230
 3320 CLS 
 3330 PRINT "%T%H%E% %D%E%P%O%S%I%T%S% %A%R%E% %C%O%M%P%L%E%T%E%D%."
 3340 RETURN 
 3400 CLS 
 3410 PRINT "THIS WILL LIST CHECKS %B%Y% %N%A%M%E   %T%O% %W%H%O%M% %W%E%R%E% %T%H%E% %C%H%E%C%K%S% %W%R%I%T%T%E%N%?"
 3430 INPUT I$
 3431 IF LEN I$=10 THEN GOTO 3435
 3433 LET I$=I$+" "
 3434 GOTO 3431
 3435 PRINT I$
 3440 LET J=0
 3445 LET H=0
 3450 LET Z=0
 3460 LET J=J+1
 3470 IF T$(J)="          " THEN GOTO 3522
 3480 IF I$=T$(J) THEN GOTO 3500
 3490 GOTO 3460
 3500 GOSUB 2100
 3502 GOSUB 2150
 3505 LET H=1
 3510 LET Z=Z+A(J)
 3520 GOTO 3460
 3522 IF H<>1 THEN PRINT "NO CHECKS TO ";I$
 3525 IF H<>1 THEN GOTO 4400
 3527 LET P=Z
 3530 PRINT "TOTAL WRITTEN TO ";I$
 3532 PRINT "=";
 3535 GOSUB 4800
 3540 GOTO 4400
 3600 CLS 
 3620 PRINT "THIS WILL LIST %B%Y% %L%I%N%E% %N%U%M%B%E%R%."
 3630 PRINT "START WITH WHICH LINE NO. ? ";
 3640 INPUT K
 3645 PRINT K
 3650 PRINT "END WITH WHICH LINE NO. ? ";
 3660 INPUT I
 3665 PRINT I
 3666 IF I-K<0 THEN GOTO 3600
 3670 LET Z=0
 3680 FOR J=K TO I
 3690 GOSUB 2100
 3692 GOSUB 2150
 3695 LET Z=Z+A(J)
 3697 IF T$(J)="DEPOSIT   " THEN LET Z=Z-(2*A(J))
 3710 NEXT J
 3720 PRINT "TOTAL BETWEEN LINES ";K;" AND ";I
 3725 LET P=-Z
 3730 PRINT "--IS ";
 3735 GOSUB 4800
 3740 GOTO 4400
 3800 CLS 
 3810 PRINT "THIS WILL LIST %B%Y% %C%H%E%C%K% %N%U%M%B%E%R%. START WITH WHICH CHECK NUMBER?"
 3830 INPUT K
 3835 PRINT K
 3840 PRINT "END WITH WHICH CHECK NO. ? ";
 3850 INPUT I
 3852 PRINT I
 3854 IF I-K<0 THEN GOTO 3800
 3860 LET Z=0
 3862 LET G=0
 3865 GOSUB 4700
 3870 FOR H=K TO I
 3880 LET J=0
 3890 LET J=J+1
 3900 IF T$(J)="          " THEN GOTO 3930
 3910 IF N(J)=H THEN GOTO 3955
 3920 GOTO 3890
 3930 PRINT "CHECK NO. ";H;" NOT WRITTEN"
 3940 GOTO 3957
 3950 GOTO 3990
 3955 GOSUB 4600
 3956 LET Z=Z+A(J)
 3957 LET G=G+1
 3958 IF G<17 THEN GOTO 3980
 3960 GOSUB 2150
 3962 LET G=0
 3964 CLS 
 3966 GOSUB 4700
 3980 NEXT H
 3990 PRINT "TOTAL BETWEEN NO. ";K;" AND ";I
 3995 LET P=Z
 4000 PRINT "--IS ";
 4005 GOSUB 4800
 4010 GOTO 4400
 4100 CLS 
 4130 PRINT TAB 9;"%L%E%D%G%E%R% %C%O%L%U%M%N%S"
 4140 GOSUB 4900
 4170 PRINT 
 4180 PRINT "WHICH COLUMN NO. DO YOU NEED ?";
 4190 INPUT K
 4195 PRINT K
 4200 LET Z=0
 4205 LET J=0
 4210 CLS 
 4215 GOSUB 4700
 4225 LET G=0
 4230 LET J=J+1
 4240 IF T$(J)="          " THEN GOTO 4300
 4250 IF L(J)=K THEN GOTO 4270
 4260 GOTO 4230
 4270 GOSUB 4600
 4273 LET G=G+1
 4275 IF G>17 THEN GOSUB 2150
 4278 IF G>17 THEN GOTO 4210
 4280 LET Z=Z+A(J)
 4290 GOTO 4230
 4304 PRINT "TOTAL OF COLUMN NUMBER ";K
 4305 LET P=Z
 4310 GOSUB 4800
 4315 PRINT " FOR ";Q$(K)
 4320 GOTO 4400
 4400 PRINT AT 21,1;"%P%R%E%S%S% %E%N%T%E%R% %T%O% %R%E%T%U%R%N% %T%O% %M%E%N%U"
 4430 INPUT I$
 4440 GOTO 200
 4500 SLOW 
 4505 IF INKEY$<>"" THEN GOTO 4505
 4510 IF INKEY$="" THEN GOTO 4510
 4520 LET U$=INKEY$
 4525 FAST 
 4530 RETURN 
 4600 PRINT J;
 4610 PRINT TAB 4;N(J);
 4612 LET P=A(J)
 4615 PRINT TAB 9;
 4617 GOSUB 4800
 4620 PRINT TAB 18;T$(J)
 4630 RETURN 
 4700 CLS 
 4710 PRINT "%L%I%N %C%H%E%C%K %A%M%T%.    %T%O% %W%H%O%M"
 4720 PRINT "%N%O%. %N%O%."
 4730 RETURN 
 4800 LET P=(INT ((P*100)+.5))/100
 4805 IF P=INT (P) THEN PRINT "$";P;".00";
 4810 IF P=INT (P) THEN RETURN 
 4820 IF (10*P)=INT (10*P) THEN PRINT "$";P;"0";
 4830 IF (10*P)=INT (10*P) THEN RETURN 
 4840 PRINT "$";P;
 4850 RETURN 
 4900 LET I=1
 4940 IF Q$(I)="               " THEN RETURN 
 4950 PRINT I;"-";Q$(I) 
 4955 IF I=15 THEN RETURN 
 4960 LET I=I+1
 4965 GOTO 4940

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top