But the sentence before that says "A queue is analogous to a one-dimensional unpacked array that grows and shrinks automatically." Analogous means equivalent in some represents. I would also say that "foreach" is an indexing operations The intent is that all unpacked arrays, fixed arrays and the dynamically sized arrays (dynamic, queues, and associative) have the same semantics for all array operations except in those that would allocate or de-allocate elements, and in argument passing by reference of individual elements. Associative arrays do have a few additional methods for traversing their indexes, but there is no technical reason in restricting those methods to that one array type. Dave > -----Original Message----- > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On > Behalf Of Brad Pierce > Sent: Monday, September 03, 2007 9:05 PM > To: sv-ec > Subject: RE: [sv-ec] Can foreach iterate over a queue? If not, 12.7.3 > would be more user-friendly if it mentioned this restriction > > According to 7.11, a queue is not a kind of array -- > > "Thus, like arrays, queues can be manipulated using the indexing, > concatenation, slicing operator syntax, and equality operators." > > -- Brad > > -----Original Message----- > From: Rich, Dave [mailto:Dave_Rich@mentor.com] > Sent: Monday, September 03, 2007 9:01 PM > To: Brad Pierce; sv-ec > Subject: RE: [sv-ec] Can foreach iterate over a queue? If not, 12.7.3 > would be more user-friendly if it mentioned this restriction > > I see no reason for a restriction. This is the problem we always run > into when we try to list features exhaustively: we forget something. > > All unpacked arrays should permit the same operations. The only > difference between different array types is when resizing the array. > > Dave > > > > -----Original Message----- > > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] > On > > Behalf Of Brad Pierce > > Sent: Friday, August 31, 2007 4:44 PM > > To: sv-ec > > Subject: [sv-ec] Can foreach iterate over a queue? If not, 12.7.3 > would be > > more user-friendly if it mentioned this restriction > > > > According to 7.11, > > > > "A queue is analogous to a one-dimensional unpacked array that > > grows and shrinks automatically. Thus, like arrays, queues can be > > manipulated using the indexing, concatenation, slicing operator > syntax, > > and equality operators." > > > > There is no mention of queues in 12.7.3 regarding "The foreach loop", > > and there is no mention of 'foreach' in 7.11, so I'm assuming that > > 'foreach' is one place where this analogy breaks down. > > > > 12.7.3 would be more user-friendly if it mentioned this restriction. > > > > -- Brad > > > > > > > > > > > > > > > > > > > > > > -- > > 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 Mon Sep 3 23:19:11 2007
This archive was generated by hypermail 2.1.8 : Mon Sep 03 2007 - 23:19:39 PDT