[sv-bc] RE: 8.13.1 Array assignment patterns

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon Dec 19 2005 - 05:51:47 PST
Let me guess now:

The phrase "otherwise, an error is generated" applies only to "must be
castable to the type of the element or subarray", i.e., if it is not so
castable, then an error is generated.

That is not clear from the text.

Please note that in final editing, maybe by IEEE, the comma before
"otherwise" was changed to a semicolon in both 8.13.1 and 8.13.2. The
use of a semicolon makes it look like "otherwise" applies to the entire
preceding clause, more so than a comma.

Shalom


> Question 2:
> 
> 8.13.1 says,
> "The default:value applies to elements or subarrays that are
> not matched by either index or type key. If the type of the
> element or subarray is a simple bit vector type, matches the
> self-determined type of the value, or is not an array or
> structure type, then the value is evaluated in the context of
> each assignment to an element or subarray by the default and
> must be castable to the type of the element or subarray;
> otherwise, an error is generated. For unmatched subarrays, the
> type and default specifiers are applied recursively according
> to the rules in this clause to each of its elements or
> subarrays. For unmatched structure elements, the type and
> default keys are applied to the element according to the rules
> for structures."
> 
> Although I think I understand the intent of this paragraph, I
> find the wording very difficult.
> 
> It seems to say the following (2nd sentence, my additions in
> uppercase):
> 
> "If the type of the element or subarray is a simple bit vector
> type OR IF THE TYPE matches the self-determined type of the
> value OR IF THE TYPE is not an array or structure type, then
> the value is evaluated in the context of each assignment to an
> element or subarray by the default and must be castable to the
> type of the element or subarray; otherwise, IF THE TYPE DOES
> NOT MEET ONE OF THESE 3 CONDITIONS, an error is generated."
> 
> It seems to say that either one of the 3 conditions is met or
> an error is generated.
> 
> Then it says,
> "For unmatched subarrays, ... For unmatched structure elements,
> ..."
> 
> These seem to talk about cases where none of the 3 conditions
> is met. But we said that an error is generated in that case.
> 
> Even if I am misreading the text, it means that the text is at
> best unclear.
> 
> Please clarify.
> 
> 8.13.2 has a similar problem.
Received on Mon Dec 19 22:36:20 2005

This archive was generated by hypermail 2.1.8 : Mon Dec 19 2005 - 22:37:10 PST