Re: [sv-bc] Question on ?: with "any" data type

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Feb 07 2006 - 14:07:35 PST
<blush>

I don't know how I managed to miss 8.18 (which was the real
problem).  Sigh.

Sorry for wasting your time.


In looking at the 8.18 text, it seems that "equivalent type"
rules don't directly cover things like queues, etc.  However,
from 5.7 we have:
     A dynamic array can be assigned to a fixed-size array of an
     equivalent type if the size of the dynamic array dimension
     is the same as the length of the fixed-size array dimension.

So I think that for queues and dynamic arrays it might make sense
to treat the "same length" as a run-time check and having the
rest of the "equivalent type" rules be retained.  I agree that
the associative array case is very odd here.

Gord.

Steven Sharp wrote:
[...]
> 
> Things seem really fuzzy for objects that can have differing numbers
> of elements, such as queues and associative arrays.  My best guess is
> that combining a queue containing 5 elements with one containing 8
> elements would result in an 8-element queue where the last 3 elements
> were all the default initialization value (since those elements did
> not match in both).  But you could instead get a 5-element queue,
> which behaves similarly in some ways, giving you back the default
> initialization value if you try to read the extra 3 elements.  Similar
> possibilities exist for associative arrays.
> 
> It's all very messy.
> 
> Steven Sharp
> sharp@cadence.com
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com
Received on Tue Feb 7 14:07:49 2006

This archive was generated by hypermail 2.1.8 : Tue Feb 07 2006 - 14:08:42 PST