For example 794 and 2030. Dave > -----Original Message----- > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On > Behalf Of Brad Pierce > Sent: Tuesday, September 18, 2007 6:37 PM > To: sv-ec@server.eda-stds.org > Subject: RE: [sv-ec] multiple non-static array dimensions > > Dave writes -- > > "There are a number of bugs in the BNF that prevent constructing a > dynamic array that is a member of another array, or even a member of a > structure. Same problem for constructing classes. I think this was just > an oversight." > > Dave, Would you please file a Mantis item with representative examples > you believe should be legal, but the current BNF disallows? > > Thanks, > > -- Brad > > -----Original Message----- > From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of > Rich, Dave > Sent: Tuesday, September 18, 2007 5:20 PM > To: Steven Sharp; sv-ec@eda-stds.org; michael.burns@freescale.com > Subject: RE: [sv-ec] multiple non-static array dimensions > > There are several mantis items already open on this. > > The general consensus has been that an array is a single dimensional > type whose element type many be any type, including another array > (except that a packed array may not contain unpacked types). A > dimensional type is indexing method that could be a fixed-sized, > dynamic, associative or queue type. So a multi-dimensional array is just > a special case of an array whose element type is a similar array > dimensional type. > > > There are a number of bugs in the BNF that prevent constructing a > dynamic array that is a member of another array, or even a member of a > structure. Same problem for constructing classes. I think this was just > an oversight. > > > Dave > > > > -----Original Message----- > > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] > On > > Behalf Of Steven Sharp > > Sent: Tuesday, September 18, 2007 4:38 PM > > To: sv-ec@server.eda-stds.org; michael.burns@freescale.com > > Subject: Re: [sv-ec] multiple non-static array dimensions > > > > > > >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. > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Sep 18 19:10:49 2007
This archive was generated by hypermail 2.1.8 : Tue Sep 18 2007 - 19:11:12 PDT