READ DATA
FOR ZX 81 – TIMEX 1000
By: Walter Bader
PUT ALL DATA INTO ONE STRING (D$)
Separate data by commas (,) put a comma at end followed by STOP (SHIFTED A) (no commas may be in the DATA) (see note)
When you return to your program from the Read Subroutine, the current data element will be in R$.
1. INITIALIZE: (must be processed before any READ statements)
DATA LINES (LET D$ =" data, data, data,"
(LET D$ = D$+" data, data, etc., STOP "
LET READ = (gosub line #)
LET RP = 0
2. READ STATEMENTS
GOSUB READ
(LET variable = VAL R$
(LET string variable = R$
3. RESTORE STATEMENTS
LET RP = 0
4. SUBROUTINE (AT LINE # READ)
LET DP = RP + 1
IF D$(DP)= "STOP" THEN GOTO READ + 6
LET RP = RP + 1
IF D$ (RP) = "," THEN GOTO READ + 2
LET R$ = D$ (DP TO RP - 1)
RETURN
PRINT "OUT OF DATA"; END
5. VARIABLES USED
D$ – DATA STRING
R$ – DATA RETURN
DP – DATA POSITION
RP – READ POSITION
READ – GOSUB LINE #
NOTE: IF A COMMA MUST BE USED, SUBSTITUTE A TOKEN OR GRAPHIC FOR ALL COMMAS (SUGGEST LLIST)

TS PUZZLE
Here is a word square puzzle that was generated by a program contributed by Joan Kealy. Look for as many words having to do with TIMEX/Sinclair computing, as you can find. Send your answers back to me:
Abilene TSUG
c/o Chris Nystrom
609 E.N. 18th
Abilene, Texas 79601
and I will a list the names and the number of words each person found.

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