How do I mimic the InsertAfer (and InsertBefore for that matter) with the BlitzMax TList system?
Here I'm trying to get Mark to sit between Amanda and Mary but he's playing hard to get ....
Here I'm trying to get Mark to sit between Amanda and Mary but he's playing hard to get ....
global list:TList=CreateList() Type nametype Field name$ End type Local n:nametype ' build a list of 4 names n=New nametype n.name="Tom" ListAddLast list,n n=New nametype n.name="Amanda" ListAddLast list,n n=New nametype n.name="Mary" ListAddLast list,n n=New nametype n.name="Peter" ListAddLast list,n ShowList Print "Tom, please leave the Big Brother house!" list.RemoveFirst ShowList n=New nametype n.name="Mark" Print "Inserting Mark between Amanda & Mary (lucky guy)" '' list.InsertAfterLink ??? 'ShowList Input "Done. Return to end ..." Function ShowList() Print "(press return ...)" Print " " Input For Local n:nametype=EachIn list Print " -> "+n.name Next Print " " End Function