Oh, I figured out the EachIn part ... should be:
Hey, that's a nice little speedup. 72 millisecs for 1 million calls, compared to 80 millisecs for a regular for-next numerical loop. The only drawback is that since the `loopcounter` is tied into the EachIn thing, there can only be one value for the tempfunc per iteration. It'd be nice to be able to do a procedural EachIn such as:
ie to keep track of where I am in reading the myfunctions array rather than recomputing the offset for every call. Or maybe an EachIn loop should also let you define a To amount, to stop somewhere? And maybe a From ... ie
would be nice :-D
But anyway, I still need someone to explain the array resize thing. :-)
Local tempfunc(param:Int) For tempfunc=EachIn myfunctions tempfunc(param) Next
Hey, that's a nice little speedup. 72 millisecs for 1 million calls, compared to 80 millisecs for a regular for-next numerical loop. The only drawback is that since the `loopcounter` is tied into the EachIn thing, there can only be one value for the tempfunc per iteration. It'd be nice to be able to do a procedural EachIn such as:
For counter=0 to 9 NextIn(myfunctions)(param) Next
ie to keep track of where I am in reading the myfunctions array rather than recomputing the offset for every call. Or maybe an EachIn loop should also let you define a To amount, to stop somewhere? And maybe a From ... ie
Local tempfunc(param:int) For tempfunct=EachIn myfunctions[18] To 49 tempfunct(param) Next
would be nice :-D
But anyway, I still need someone to explain the array resize thing. :-)