Hey Guys,
Right now when I want to call the same subroutine 50 times subsequently I do the following code.
Start:
GOSUB GoForward
x=x+1
IF x>49 THEN
GOSUB Stop
ELSE
GOTO Start
ENDIF
Any easier way to do this?
Thanks,
Eric
Hey Guys,
Right now when I want to call the same subroutine 50 times subsequently I do the following code.
Start:
GOSUB GoForward
x=x+1
IF x>49 THEN
GOSUB Stop
ELSE
GOTO Start
ENDIF
Any easier way to do this?
Thanks,
Eric
As long as i've interpreted your code correctly, this will do the same thing:
Code:for x=0 to 49 GOSUB GoForward next x GOSUB Stop
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Code:<font color="#000000">X = <font color="#FF0000"><b>0 </b></font><font color="#000080"><b>WHILE </b></font>X < <font color="#FF0000"><b>50 </b></font><font color="#000080"><b>GOSUB </b></font>GoForward X = X + <font color="#FF0000"><b>1 </b></font><font color="#000080"><b>WEND GOSUB </b></font>SubStop <font color="#000080"><i>' Stop is reserved word, use something else; like SubStop. </i></font>
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks