Update confirmed that IF and EI (ElseIf) do make Boolean Evaluations I don't have to set the TF test into a different var.
ToDo get the rest of the numeric arguments to work that way or confirm they refuse to play nice amongst non numeric arguments and comma splitters and variable substitutions... that would be really helpful for Loc, At, Tag and All the graphics commands. Then I think I can setup a similar thing for String Evaluation but wait and see how numeric evals fit in other commands.
Re:Random points on a SB1 screen
Holy moley the thing Luke showed us in discussion of getting random points struck in full force trying to do random pixels and even random boxes on SB1 screens way way way too regular diagonal patterns, Yikes!
I was so desperate to get rid of that, I set up a PtDeck in SB1 with a shuffle Sub (I tried this first in an SB1 program but it ran way too slow to be of any practical use, and I got a good taste of just how slow things run in the Interpreter!). So the PtDeck puts 1024 * 672 numbers into an array, 1 for each point on screen. then I shuffle them and have a shared index to pass through the deck so each point is visited once before we repeat the same point after reshuffling the deck. So, much nicer randomness, still some streaks but that is from regularity of coloring, I hope. And if I want more true randomness I think all I have to do is shuffle the deck of points before each draw so theoretically you could draw the same point twice in row or 5 times or 1,000,000 but don't bet on it.
So now I have everything messing up very nicely, thank you very much!
New (case insensitive) command for SB1 is Syntax: RndPt varContainer
example of use:
RndPt xy
RndX = xy % xmax
RndY = int( xy / ymax )
Qb64 does this stuff instantly compared to SB1 that is still working to fill a screen:
_Title "Random Screen Test" 'b+ 2021-03-04 deck(i) = i
cnt = cnt + 1
deckidx = deckidx + 1
deckidx = 0
cnt = 0
pt = deck(deckidx)
shuffle:
Another fine mess!
(see attachment)
SB1 equivalent:
' Test al First Graphics Test.txt b+ 2021-03-03
' OK dang it! I made some special arrangements in SB1 to make a deck of pts
' to shuffle those points and to access the next point to be dealt with rndPt command
paper 0, 0, 0
ratio = ymax / xmax
top = 688217
[
+= cnt, 1
'ink 0, 0, 0, 1
'fbox 0, 0, xmax, ymax
'jmp cnt > 300
rndpt rp
x1 = rp % xmax
'x2 = ( rnd * xmax + c ) % xmax
'y2 = ( rnd * ymax + c ) % xmax
'w = rnd * 100
'h = rnd * 67
'every 3rd color is green white or blue with rnd? alpha
r = 0
g = 190
b = 0
ei (( cnt %3)= 1)
r = 255
g = 255
b = 255
el
r = 0
g = 0
b = 255
fi
ink r, g, b, a
'box x1, y1, w, h
'pix x1, y1
fcirc x1, y1, 1
'fbox x1, y1, w, h
]
SB1 Labors for same mess:
(compare 2 attched screen shots)