Shalom, thanks for your comments. > I note that 19.7 says, "$increment shall return 1 if $left is greater > than or equal to $right and -1 if $left is less than $right." > This does > not specify what happens if $left==$right. That can happen with a > 1-element array, and there are such things. I think this is OK, provided the corner case is noted. $increment tells you what to add to a subscript to move one place to the left. For a fixed-size 1-element array, it doesn't matter whether this is -1 or +1; either will take you off the end. For a dynamic or queue array, I think we should invariably have $increment = -1, since such arrays always have [0:N-1] subscripts. > I can accept $left being 0 and $right being -1 for empty arrays, but > then the definitions of $low and $high have to change Noted, thanks. As a footnote: I think it's still correct for *all* the array query functions, except $dimensions() and $unpacked_dimensions(), to return 'x if $dimensions() returns 0 - in other words, if the object being queried is not an array at all. -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 Email: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Nov 27 07:14:39 2007
This archive was generated by hypermail 2.1.8 : Tue Nov 27 2007 - 07:14:47 PST