Structs
From CEW
Contents |
StructNew()
[edit] type
The type attribute allows you to specify what type of Struct to create.
StructNew("normal") - an ordinary structure
StructNew("linked") - the order of the keys is guaranteed.
StructNew("weak") - the content of the Struct is not guaranteed, and may be removed by the Garbage Collector.
[edit] case-sensitivity
BlueDragon supports an optional case-sensitivity argument to the StructNew function.
If set to true, struct keys will have their case preserved and must be referred to correctly.
[edit] Inline Struct
Inline structs allow you to create a struct in a more convenient fashion.
Railo has supported the Struct(A:1,B:2,C:3) notation from version 1.
Adobe added [A:1,B:2,C:3] notation to ColdFusion 8, with several restrictions.
[edit] Nested Inline Struct
With Railo, Struct() is a function and thus can be nested:
Struct( X:Struct(A:1,B:2,C:3) , Y:Struct(D:4,E:5,F:6) , Z:Struct(G:7,H:8,I:9) )
The CF8 notation did not initially support nesting. With CF8.0.1 it is now possible to nest inline structs:
[ X:[A:1,B:2,C:3] , Y:[D:4,E:5,F:6] , Z:[G:7,H:8,I:9] }</cde>




