Yes, this question currently belongs in the sv-ec. (I would be totally in favor of collapsing the two groups into one errata group) I agree with you that new[0] could be the same as delete, but I could also see users wanting it to be an error and requiring them to use an explicit delete. Other opinions? In 22.6, I believe it should read "If the dimension currently does not exist" This would be the case in a multi-dimensional array if a higher order dimension is out of range and the second order dimension is queried. For example: int A[$][$];// assume no elements have been added or int A[2][2]; then $size(A[2]) should return 'x For the queue, if I do A={ {}, {}, {} }; Then $size(A[2]) should return 0 Dave ________________________________ From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom Sent: Tuesday, November 08, 2005 6:19 AM To: sv-bc@eda.org Subject: [sv-bc] 5.6, 22.6: Dynamic Arrays questions Does the following belong to sv-ec? In a dynamic array, is it legal to give new[0] ? Does it do the obvious, emptying the array, like delete()? Second, regarding size() and $size: 5.6.2 says that size() "returns the current size of a dynamic array, or zero if the array has not been created." and "The size dynamic array method is equivalent to $size(addr,1) array query system function (see 22.6)." 22.6 says that "When used on a dynamic array ..., these functions return information about the current state of the array. If the dimension is currently empty, these functions shall return a 'x." So, on an empty dynamic array, what do size() and $size return? Thanks, Shalom Shalom Bresticker Intel Jerusalem LAD DA +972 2 589-6852
This archive was generated by hypermail 2.1.8 : Tue Nov 08 2005 - 07:33:17 PST