Ah. Now I understand. You are quite correct. I believe that should be an error, although I wouldn't push to make it a syntactical error. Arturo -----Original Message----- From: Neil.Korpusik@Sun.COM [mailto:Neil.Korpusik@Sun.COM] Sent: Tuesday, July 11, 2006 5:04 PM To: Arturo Salz Cc: SV_EC List Subject: Re: [sv-ec] Mantis item 978 has been updated - ready for an email vote Arturo, I think you may have misunderstood the situation that I was asking about in question 2. I was indeed asking about the array manipulation methods, and not about the index method (as you suggested). Is the following allowed? The BNF allows it, but it doesn't seem to make a lot of sense, since the only use for the argument to the method is for specifying the name of the iterator variable to be used by the with clause. If there is no with clause it seems to be confusing to have the argument specified. int ia[]; int q[$]; ... q = ia.find(x); // allowed? (passing in x, even though no 'with' clause) q = ia.find(x) with(x>5); // this is a more typical case Neil Arturo Salz wrote On 07/11/06 16:19,: > Neil, > > The proposal of item 978 looks good to me. > > As for your 2 questions, here's my two cents: > > 1) Should shuffle() only be allowed on unpacked arrays? > > I don't see why not. > In fact I can't remember why sort/rsort are disallowed on packed > arrays? > > 2) Is it an error to specify the name of an iterator when there is no > corresponding 'with' clause? > I believe you mean array methods and not iterator, right? > Then, no, It's not an error. The LRM even shows two examples. > > Arturo > > -----Original Message----- > From: owner-sv-ec@eda-stds.org [mailto:owner-sv-ec@eda-stds.org] On > Behalf Of Neil Korpusik > Sent: Tuesday, July 11, 2006 1:01 PM > To: SV_EC List > Subject: [sv-ec] Mantis item 978 has been updated - ready for an email > vote > > Mantis item 978 has been updated, based on the feedback from the July > 10th > meeting, as well as a bugnote filed by Shalom. There were a few more > syntax > errors that were corrected. I also moved the paragraph from 5.15.1 to > 5.15 > which discusses the optional array iterator argument since it applies to > all of the array manipulation methods. > > I believe that mantis 978 is now ready for an email vote. > > > After looking over this section in more detail I have the following two > questions: > > 1. 5.15.2 Array ordering methods > > reverse() may be used on packed or unpacked arrays. > sort() and rsort() may only be used on unpacked arrays. > The LRM doesn't mention if shuffle() may be used on packed or > unpacked > arrays. > > Should shuffle() only be allowed on unpacked arrays? > > 2. 5.15 Array manipulation methods > > Is it an error to specify the name of an iterator when there is no > corresponding 'with' clause? Syntax box 5-3 implies that it is legal. > > > There are 4 other mantis items that deal with this same section of the > LRM. > 1038 5.15.2 Array ordering methods - only 1-D arrays? > 1437 Prototype syntax for array locator methods in 5.15.1 is not > legal > 1490 Array ordering methods on associative arrays > 1517 Array reduction methods used in constraints > > > -- --------------------------------------------------------------------- Neil Korpusik Tel: 408-720-4852 Senior Staff Engineer Fax: 408-720-4850 Frontend Technologies - ASICs & Processors (FTAP) Sun Microsystems email: neil.korpusik@sun.com ---------------------------------------------------------------------Received on Tue Jul 11 18:42:32 2006
This archive was generated by hypermail 2.1.8 : Tue Jul 11 2006 - 18:42:44 PDT