Re: [sv-ec] multiple non-static array dimensions

From: Steven Sharp <sharp_at_.....>
Date: Tue Sep 18 2007 - 16:38:09 PDT
>Are multiple dynamic array dimensions allowed?
>
>   int var1[][];

Yes.


>I haven't been able to find anything definitive in 1800-2005 or in draft 3a, 
>though 3a does define a dynamic array as "_any_ dimension of an unpacked array 
>whose size can be set or changed at run time"; to me, this statement means that 
>a dynamic array does not have to be the only unpacked dimension, but it does 
not 
>necessarily imply that multiple dynamic unpacked dimensions are allowed.

The LRM was rather unclear about this.  I misinterpreted it initially myself.


>If this is allowed, I would expect that the outer array would need to be 
>"new"ed, then each array-in-array would need to be "new"ed separately, yes?

Yes.  The outer array is essentially an array of handles to dynamic
arrays.  


> And, 
>also that arbitrary combinations of queues and associative arrays would also be 
>allowed as unpacked dimensions.

Yes.


Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Sep 18 16:38:33 2007

This archive was generated by hypermail 2.1.8 : Tue Sep 18 2007 - 16:38:42 PDT