|
Post by NovaGene on Jun 14, 2004 4:32:11 GMT -5
Hi Tom,
I got an "expected ':' " error when I run these lines which seems to be valid statements:-
dim x, y
for x=1 to 10 for y=1 to 10
'loop section
next y next x
When the i remove "y" variable in "next y" and "x" variable in "next x", the problem disappears.
Thanks!
-Lucas Tan-
|
|
|
Post by Mortiis on Jun 14, 2004 7:03:40 GMT -5
its not a proper usage of for...next loops.by using the code above you are printing 1 to 10 ten times. but there is no command like next x or next y just next...sorry for my awful english happy codings...
|
|
|
Post by NovaGene on Jun 15, 2004 1:38:14 GMT -5
Not to worry, as long as i can understand what you mean its alright with me... ;D
Having "next x" and "next y" should be valid syntaxs for a basic language. This is useful when the program gets larger, whereby one can identify which "for" statement it is from.
However, this is nothing critical. Come to think of it, I can always use:-
next 'y next 'x
Thanks!
|
|
|
Post by Tom Mulgrew on Jun 15, 2004 22:23:43 GMT -5
To be honest, I'd completely forgotten about that syntax!
I could add it in if people really need it...
|
|
|
Post by AHBanen on Jun 16, 2004 3:52:48 GMT -5
Please don't, it will only lead to errors like:
for x = 1 to 10 for y = 1 to 5 next x next y
André
|
|
|
Post by NoVaGene on Jun 16, 2004 12:13:00 GMT -5
Allow Tom to decide on this.
|
|