Array,List,Map of pointers of an undefined structure
Posted: Wed Apr 27, 2016 9:04 pm
It is possible to define a pointer in a structure with an undefined structure. Thereby you can define cycle structures:
But why doesnt work this with arrays/lists/maps:
Is it possible to transfer this behaviour to arrays/lists/maps?
Thanks
Kevin
Code: Select all
Structure Main
*pointer.SubStruc
*noerror.ANonexistentStruc
EndStructure
Structure SubStruc Extends Main
foo.i
EndStructure
test.Main
test\pointer\foo = 2 ; it works, because the structure is subsequently defined
; test\noerror\bar = 3 ; clear, compiler error, an undefined structure is used
Code: Select all
Structure Main
Array *a.SubStruc(1) ; compiler error
List *b.SubStruc() ; compiler error
Map *c.SubStruc() ; compiler error
EndStructure
Structure SubStruc Extends Main
foo.i
EndStructure
test.Main
AddElement(test\b())
test\b()\foo = 2
Thanks
Kevin