Quote Originally Posted by skimask View Post
Also, GOSUBs don't work well after a single line IF/THEN, and neither do FOR/NEXT loops.
I missed this when it was first posted (on the basis I don't read everything)... this is news to me... do you have examples?

I've written some pretty complex programs and haven't come across this problem - unless of course you're dropping COLONs all over the place and your GOSUB follows on... not something I've ever done (on one line).

Example

If A=0 then Goto Start else A=A+1:Gosub DoThis

This is equivalent to...

If A=0 then
Goto Start
else
A=A+1
Gosub DoThis
Endif

And NOT as may be expected...

If A=0 then
Goto Start
else
A=A+1
endif
Gosub DoThis

There is a distinct difference (and some tricky workings) if you bung all your code on one line separated with colons. It's not really the way it should be written. There are rules for IF/THEN/ELSE, WHILE/WEND, FOR/NEXT etc.