[sv-bc] question about section 4.7 and 4.8

From: Francoise Martinolle <fm@cadence.com>
Date: Mon Feb 14 2005 - 13:06:56 PST

 
I think that the rules for array assignments section 4.7 and
arrays passed as arguments (section 4.8) are not
always written correctly with respect to section 5.9 on type compatibility.
 
Section 4.7 states that 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.
 
Section 4.8 states that a dynamic array can be passed as an argument to a
fixed -size array formal
if the types are compatible and of the same size.
"A subroutine that accepts a fixed size array can accept a dynamic array of
a compatible type
of the same size "
 
Which kind of type compatibility are we talking about in this last sentence.
I presume that
the sentence in section 4.8 meant to say that the types shall be
equivalent and that the size of the dynamic array shall be the same
as the length of the fixed-size array dimension.
 
Another issue exists with the sentence in 4.7 and 4.8:
Section 4.7:
"A dynamic array or a one-dimensional fixed size array can be assigned to
dynamic array
of a compatible type. "
Section 4.8:
"A subroutine that accepts a dynamic array can be passed a dynamic array of
a
compatible type or a fixed-size array of a compatible type"
 
I think it should say :
Section 4.7:
A dynamic array or a one dimensional fixed size array can be assigned to a
dynamic array
which has an equivalent array element type.
 
Section 4.8:
a subroutine that accepts a dynamic array can be passed a dynamic array or a
fixed -size
array which have an equivalent array element type.
 
Is my interpretation correct?
 
Francoise
       '
 
 
Received on Mon Feb 14 13:07:00 2005

This archive was generated by hypermail 2.1.8 : Mon Feb 14 2005 - 13:07:05 PST