I don't think that it makes sense to create entries in an associative array as 13.4.7 suggests. For dynamic arrays, the indices are constrained to the range 0..N so just specifying a size is sufficient. I think that if you want a randomly sized and/or randomly indexed associative array that you need to first construct the "shape" and then randomize the elements. Gord. Ryan, Ray wrote: > In the section 13.3 where random variable are discussed, the LRM state: > "The size of a dynamic array declared as rand or randc can also be > constrained. In that case, the array shall be resized according to the > size constraint, and then all the array elements shall be randomized. > ... " > >>From this my assumption would be that this resizing only applied to > dynamic arrays > and not associative arrays or queues. > > However in 13.4.7 (Iterative Constraints) there is the text: > "The size method of a dynamic or associative array can be used to > constrain the size of the array ... " > > This suggests that associative arrays are also re-sized by randomize. > Is this the case? > > If so, what index values are used for the entries? There isn't any way > to specify a constraint > on the index value. Are all the existing entries first deleted? > > It seems the statement in 13.4.7 may be a typo (shouldn't have mentioned > associative arrays). > > - Ray > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Tue May 16 22:22:55 2006
This archive was generated by hypermail 2.1.8 : Tue May 16 2006 - 22:23:59 PDT