Posted: Mon Oct 17, 2011 3:03 pm Post subject: Re: [Tutorial] LOOPs and FOR loops
is there any other way to make
Turing:
for i:1..infinity
endfor
other than
Turing:
var count:int
count:=0 loop
count:=count+1 %code% endloop
Sponsor Sponsor
Aange10
Posted: Mon Oct 17, 2011 4:53 pm Post subject: RE:[Tutorial] LOOPs and FOR loops
Well, I'm pretty sure infinity, even for a dynamic array is impossible (hence the maxint command). Though I could be wrong (floating points or some other mumbo jumbo I don't know a lot about.)
But to answer your question, yes. They are called flexible arrays. For an explanation, please read Arrays. Note that it has three different tutorials in the one page. (Arrays, Multi-Dementional arrays, and flexible arrays.) The posts are just separated.
Also, please check the time stamps on these topics. The last post was in 2005. Resurrecting a 6 year old topic is generally looked down upon.
Tony
Posted: Mon Oct 17, 2011 4:58 pm Post subject: Re: [Tutorial] LOOPs and FOR loops
evildaddy911 @ Mon Oct 17, 2011 3:03 pm wrote:
is there any other way to make
Turing:
for i:1..infinity
endfor
Sure. How about
code:
for j:2..infinity
i := j - 1
...
end
For some value of "infinity". What are you _trying_ to do?