What is the best way to directly access a specific type instance? (i.e. without for/eachin).
With this code...
how would I directly access 'My Hero' and change the age?
If you would have coded it differently then please let me know how with, if possible, a small example.
Many thanks
With this code...
Strict Global my_list:TList = CreateList() Type person Field name$ Field age End Type For Local x = 1 To 100 Local peeps:person = New person peeps.name$ = "Joe Bloggs" peeps.age = rnd(1,100) ListAddLast (my_list,peeps) Next Local hero:person = New person hero.name$ = "My Hero" hero.age = 9999 ListAddLast (my_list,hero) For Local y = 1 To 72 Local peeps:person = New person peeps.name$ = "Joe Bloggs" peeps.age = rnd(1,100) ListAddLast (my_list,peeps) Next For Local z:person = EachIn my_list Print "Name :" + z.name$ + " Age : " + z.age Next
how would I directly access 'My Hero' and change the age?
If you would have coded it differently then please let me know how with, if possible, a small example.
Many thanks