[Tuto] Boolean trigger in a string value...

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

[Tuto] Boolean trigger in a string value...

Post by XavSnap »

Hi,
All conditions are in the b$ value.
0=A$(1) / B$(1)
1=A$(2) / B$(2)

Code: Select all

10 DIM A$(2,1)
20 DIM B$(2,3)
40 LET A$(2)="l"
50 LET B$(2)="lll"
60 LET C$="\
010101101101010\
001001001001001\
111001111100111\
010001010001010\
101101111001001\
111100111001111\
011100110101010\
111001001001001\
010101010101010\
010101011001010"
70 LET B=1
80 FOR A=0 TO 9
90 FOR D=1 TO 5
100 PRINT A$(1+VAL C$(B)); B$(1+VAL C$(B+1));A$(1+VAL C$(B+2)),,
110 LET B=B+3 
120 NEXT D
130 GOSUB 200
140 NEXT A
150 GOTO 70
200 FOR Z=0 TO 50
210 NEXT Z
220 CLS
230 RETURN
0 to 9 counter based on 3 values "x"+"xxx"+"x" for each 5 lines :
COUNTER.P
(1.61 KiB) Downloaded 103 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply