RE: [sv-bc] Possible errata in LRM 3.1a sections 2.8 and 7.13, array literals

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Tue Aug 31 2004 - 14:18:47 PDT

>Section 2.8 says:
> Array literals can also use their index or type as a key, and a default
>key value (see Section 7.13).
> b = {1:1, default:0}; // indexes 2 and 3 assigned 0

This text is actual in the previous section 2.7.

>1) What is b? It is not declared in this example or the examples
>immediately preceding it.

Yes, it would be better to declare it.

>2) If the array is multidimensional, what is the syntax to initialize one
>element or one slice of the array? The syntax of index is not covered in
>either 2.8 or 7.13.

The constant expression for the index should evaluate to an integral number.
To initialize one element or slice of the array, the element or slice would
be on the lefthand side of the assignment operator.

-- Brad
Received on Tue Aug 31 14:18:51 2004

This archive was generated by hypermail 2.1.8 : Tue Aug 31 2004 - 14:18:59 PDT