You are quite correct, hence my earlier statement that "arrays within arrays" can be "
faked" - I knew that being lazy would get me into trouble!
The point is that the extra dimensions act as array sets themselves and so although not strictly a distinct instance of an (sub)array it can
emulate the construct.
So...
List #1 elements has child items in List #2 the child items of which are in List #3
Rather than a pointer in each that identifies the child array, a single array is used but with multi-dimensions, the number of which reflect the total number of tiers (i.e. 3 in this case)
List[List#1-Index,List#2-Index,List#3-Index]
There are plenty of opportunities for this to go screwy but it can be used to good effect if handled carefully enough.
As I recall (i.e. I may be making this up as I go along...
), awk uses associative arrays and so large subscript ranges in multi-dimensions are not resource hungry. That is, it is only as big as the total number of used unique combinations.
Pros: It doesn't allocate resource at declaration time
Cons: It doesn't allocate resource at declaration time
When people call me a "complete nawker" I've always taken it as a compliment