Just to clear this up, since everyone seems a bit sketchy on this.
When you use if-then, every command on the same line is within the if statement, so this...
if flag = 1 then dot 10,10: for x = 1 to 10 : dot x,x*2 : next x
is equal to this...
if flag = 1
dot 10,10
for x = 1 to 10
dot x,x*2
next x
endif
If you wanted to put it all on the same line with the for-next loop outside the if statement you would use endif, like so...
if flag = 1 : dot 10,10: endif : for x = 1 to 10 : dot x,x*2 : next x
The 20 line comp isn't stupid as the rules are you can only have 20 commands on a line, commands being things separated by colons.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM