The Mysterious Moving Cursor

See all articles from CATS v1 n7
Author(s): Lloyd Unsell
Publication: CATS Newsletter
Pub Details: CATS v1 n7 (Volume 1, Issue 7)
Date: October 1983
Pages: 4

At a meeting a couple of months ago, I brought a program I had written and Mark Fisher and others were intrigued by my moving “cursor”, which moved down the screen to indicate the next piece of data to be input by the user.

Here is a screen printout of one of the routines from that program, showing my “moving cursor”*indicating that item 1, cash on hand-is to be input by the user:

   ASSETS:

1.▒CASH ON HAND: $
2. ACCTS.REC.:   $
3. INS.CASH VAL.:$
4. OTHER SECUR.: $
5. REAL ESTATE:  $
6. INVENTORY:    $
7. FURN./EQUIP.: $
8. OTHER ASSETS: $

And here is the program routine that does it:

  75▒PRINT "   ASSETS:"
80 PRINT ,,"1. CASH ON HAND:","2. ACCTS.REC.:",,"3. INS.CASH VAL.:","4. OTHER SECUR.:","5. REAL ESTATE:",,"6. INVENTORY:",,"7. FURN./EQUIP.:","8. OTHER ASSETS:"
85 FOR I=2 TO 9
90 PRINT AT I,17;"$"
95 NEXT I
96 LET TA=0
98 PRINT AT 21,0;"ITEM ?"
100 FOR N=1 TO 8
102 PRINT AT N+1,2;"▒"
105 PRINT AT 21,5;N
110 INPUT B$(N)
115 LET TA=TA+VAL B$(N)
125 PRINT AT N+1,25-LEN STR$ VAL B$(N);B$(N)
130 PRINT AT N+1,2;" "
135 NEXT N

The moving cursor is accomplished by lines 102 and 130-inside the FOR-NEXT loop from 100 to 135. Just in case they miss the cursor, lines 98 and 105 tell them verbally which item is to be inputed. Line 115 keeps a “running total” of the total assets (B$ was dimensioned earlier, and TA is established at 0 by line 96). Line 125 prints the inputed values-lined up from right to left, as an addition column. Hope this is of help to some of you.

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