|
No. It's like
ON counterVar GOSUB label0, label1, label2, label3, label4, label5
There may be brackets in there, but I don't remember.
Anyway, if counter counterVar has the value 0, it will GOSUB to label0. If it's 1, GOSUB label1, etc. It's identical to BRANCH, except you can do a GOSUB instead of just the equivalent of GOTO. Note that you can similuate a BRANCH exactly by doing
ON counterVar GOTO label0, etc.
As for the code you posted, PBASIC now supports what I like to call one-line-ifs, meaning you can do
if p2_y>30 then gosub exit
Similarly, you can do stuff like:
if (p1_y < 140 AND p1_y > 117) then p1_y=127
Mmmm... tasty.
|