FOR, NEXT question
Spiral_72
Posts: 791
I have used this before on the PC, however a PC have relatively unlimited resources. The BS2 does not:
The following code is silly, does work, but it's here for illustration. If I have a FOR...NEXT loop, and in the loop have a check that can exit the loop, are there any problems with this? Does exiting leave something on a stack? or anything else that may cause a problem?
The following code is silly, does work, but it's here for illustration. If I have a FOR...NEXT loop, and in the loop have a check that can exit the loop, are there any problems with this? Does exiting leave something on a stack? or anything else that may cause a problem?
FOR x=0 TO 100 DEBUG DEC x IF X=77 GOTO DoSomethingElse NEXT END DoSomethingElse: DEBUG "We exited the FOR loop" ENDThank you again!
Comments
Take a look at the ON...GOTO and the BRANCH statements. They appear to leave nothing on the stack. Yes, they would make for a looonnnnggg command line, but no worries otherwise.
Regards,
DJ
Thank you sir.
spiral: I see the forecast for Charleston says 32 degrees tonight. Ouch! We had sunny and fairly warm here in Los Angeles today (yes, our week of warm rain finally stopped). Makes me glad I'm not in SC right now!
Erco, Man surely you can imagine what a little 2" snow does to our normal daily functions. No bread or milk in the stores, all the kerosene and heaters are sold out, cars littering the roadside, no power..... We are PRAYING for a blizzard..... cause we can't make it into work We stay home and all us rednecks get out the 4WD trucks and the ATVs YEEHAW!
(smiles)
DJ