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

structListNew Argument Reference

maxsize numeric

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 );

Fork me on GitHub