Could you let me know if the way I'm doing "types within types" is the best way to manage my data.
Basically I want to have a parent type, this one can have a whole bunch of child types inside. It seems that I must give each child type an id that will link it to the parent type in order to keep the child types mixing with other parents. Is this the best method?
t2 value is what I want, however the "id" thing seems to be absurd, that's like adding extra stuff that shouldn't be needed.
Basically I want to have a parent type, this one can have a whole bunch of child types inside. It seems that I must give each child type an id that will link it to the parent type in order to keep the child types mixing with other parents. Is this the best method?
t2 value is what I want, however the "id" thing seems to be absurd, that's like adding extra stuff that shouldn't be needed.
Graphics3D 320,240, 0, 2 Global Camera=CreateCamera() Type Parent Field id Field c.Child End Type Type Child Field id End Type For i = 1 To 10 p.parent = New Parent p\id = i For j = 1 To 10 p\c.Child = New Child p\c\id = i Next Next For p.parent = Each Parent For p\c.Child = Each Child t = t + 1 Next Exit Next For p.parent = Each Parent For p\c.Child = Each Child If p\c\id = p\id Then t2=t2+1 EndIf Next Exit Next Color 255, 255, 255 While Not KeyHit(1) RenderWorld Text 0, 0, "count: " + t Text 0, 20, "tcount: " + t2 Flip Wend End