Sorry, I have to take it all back. The wording at the intro to the section does not match the rest of the description and is contradictory. It shouldn't say that the number of loop variables must mach the number of dimensions, and then later say that you can omit them. Dave > -----Original Message----- > From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Rich, > Dave > Sent: Tuesday, January 17, 2006 2:38 PM > To: Steven Sharp; sv-ec@eda.org > Subject: RE: [sv-ec] foreach iterates over unpacked arrays > > Yes, there are good reasons. Packed objects are usually dealt with as a > whole (integral) expression and we are usually trying to iterate over > the elements we can't operate on as a whole. If we iterated over the > packed dimension, we would always be iterating bit-by bit. > > Also, foreach was added primarily for iterating over dynamically sized > array dimensions, and especially associative array dimensions, where > there is no other way to iterate. > > And also, foreach should match functionally with the semantics of random > constraints, which want to iterate stopping at integral values. > > Dave > > > > -----Original Message----- > > From: Steven Sharp [mailto:sharp@cadence.com] > > Sent: Tuesday, January 17, 2006 1:51 PM > > To: sv-ec@eda.org; Rich, Dave > > Subject: Re: [sv-ec] foreach iterates over unpacked arrays > > > > > > >From: "Rich, Dave" <Dave_Rich@mentor.com> > > > > >The LRM does not explicitly say the foreach statement iterates of > > unpacked > > arrays and not packed arrays. The wording suggests that, but could be > made > > stronger. Mantis 1306 added with proposal. > > > > And is there some technical reason why a foreach statement shouldn't > be > > allowed to iterate over packed dimensions? > > > > Steven Sharp > > sharp@cadence.com >Received on Tue Jan 17 15:01:17 2006
This archive was generated by hypermail 2.1.8 : Tue Jan 17 2006 - 15:01:50 PST