Re: [sv-ec] Mantis 958: array query functions

From: Michael Burns <michael.burns_at_.....>
Date: Thu Dec 13 2007 - 16:04:08 PST
Oops - let me re-do the declaration in the example:

bit a [1:0][];

Thanks!
--Mike

Michael Burns wrote:
>
> In reviewing 958 for the vote, I'm realizing that it perpetuates the 
> fallacy that there is a unique size to a dynamically sized dimension. 
> Any of the functions that take a dimension expression cannot in 
> general return a meaningful result when referring to a dynamically 
> sized dimension whose dimension expression is not 1:
>
> bit [1:0][] a;
> a[0] = new[4];
> a[1] = new[37];
>
> $right(a,2) = ???
> $size(a,2) = ???
>
> Granted, this is not the problem that 958 is addressing, but it's 
> pretty close. Is this the sort of thing that can be filed as an errata 
> and fixed after our deadline?
>
> Mike
>
> Jonathan Bromley wrote:
>> Shalom,
>>
>>  
>>> Re 7.5.1:
>>>
>>> "The number of elements in the array. Must be a non-negative integral
>>> expression. The type of this operand is longint. It shall be an 
>>> error if
>>> the value of this operand is negative. If this operand is zero, the
>>> array shall become empty so that its size
>>> will be reported as zero by its .size method (see 7.5.2)."
>>>
>>> The second sentence, "Must be a non-negative integral expression," was
>>> deleted by Mantis 1427.
>>>
>>> The end, "so that its size will be reported as zero by its .size 
>>> method (see 7.5.2)," is not necessary.
>>>     
>>
>> Agreed; I'll fix both.  Thanks.
>>   
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Dec 13 16:04:35 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 13 2007 - 16:04:42 PST