ForEach MyList() As *MyListElement
Posted: Thu May 09, 2013 6:26 pm
I think the subject is saying all.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
ForEach *pointer.MyListStruct In MyList()
Code: Select all
Macro Item(Object, ListOrMap)
ListOrMap
Object=ListOrMap
EndMacro
Structure Person
Name.s
Age.i
EndStructure
NewList Persons.Person()
AddElement(Persons())
Persons()\Name = "Jim"
Persons()\Age = 30
ForEach Item(*p.Person, Persons())
Debug *p\Name + " is " + *p\Age + " years old"
Next