Why don't we have EACH?

BlitzMax Forums/BlitzMax Programming/Why don't we have EACH?

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.

On the other hand doing that requires me to store that pointer in every single function that can create an animation object and I have like ten of them.


Do explain what you mean by this, because I'm afraid it sounds a lot like you're confused as heck.

<Stuff posted before I spotted your reply>
Here's an example:
SuperStrict

Type Foo
    Field _link:TLink
    
    Method Link( list:TList ) ' Convenience method
        If _link Then _link.Remove( )
        _link = Null
        If list Then _link = list.AddLast( Self )
    End Method
End Type

Local list:TList = New TList

For Local i:Int = 0 To 63
    New Foo.Link( list )
Next

For Local i:Foo = EachIn list
    i.Link( Null )
Next