An array slices question

BlitzMax Forums/BlitzMax Beginners Area/An array slices question

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Oh, I figured out the EachIn part ... should be:

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. :-)