structListNew

Creates a new structure, that has a maximum number of items. It will maintain the insertion order of the structure.

structListNew(maxsize) → returns struct

This function requires OpenBD.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

maxsize numeric
Required

The maximum number of items that this struct will hold.

Examples
Sample code invoking the structListNew function

Creates an ordered struct with a maximum of 3 items.

sampleStruct = structListNew(3);
sampleStruct.a = 1;
sampleStruct.b = 2;
sampleStruct.c = 3;
writeDump( sampleStruct );

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub