Wouldn't it be useful to use something like "structures in arrays in a list?"
For Example something like:
Code: Select all
Structure car ;Define structure cars typ.s
speed.l
color.s
EndStructure
Structure child ;Define structure child with array inside
name.s
age.l
hobbys.s[10]
EndStructure
Structure person ;Define Struture person with Arrays AND Structures in structures inside
name.s
age.s
car.car
parents.s[2]
children.child[10]
EndStructure
Global date1.person ;defines a Variable of type person
date1\car\typ = "Ford" ;struct. in struct.
date1\parents[1] = "Mum" ;array in struct.
date1\children[1]\name = "Mary" ;struct. in array in struct.
date1\children[1]\age = 25
date1\children[1]\hobbys[1] = "hangin' around" ;array in array in struct
date1\children[2]\name = "Joana"
date1\children[2]\age = 35
Dim alldates.person(10) ;defines an array of type person
alldates(1)\children[2]\name = "Johanna" ;struct. in array in array
;______________ And here the favourite ::
NewList alldataLIST.person() ;defines a list of type person
AddElement(alldataLIST())
alldataLIST()\children[2]\name ="Jeans" ; --> struct. in a array in a list (!)You can do ALL with Lists but Lists in Lists.
(is this grammatically correct?)
Purebasic - what a nice name for a girl-friend
