Following up on http://www.eda-stds.org/sv-bc/hm/4126.html , I now see on the next page that "When loop variables are used in expressions other than as indexes to the designated array, they are auto-cast into a type consistent with the type of index." For example, "For fixed-size and dynamic arrays, the auto-cast type is int." That helps resolve part of Mantis item 1245, but not all, unless even the type() operator and $typename() are supposed to be fooled by this "auto-cast". Why not just define the index variables to have the specified types, instead of using the indirection of an "auto-cast"? -- Brad ________________________________ From: Brad Pierce Sent: Tuesday, February 28, 2006 11:07 PM To: sv-bc@eda.org Subject: type(i) of a foreach index i According to 10.5.3, "The type of each loop variable is implicitly declared to be consistent with the type of array index." I don't know how to use this to calculate type(i) of the index, or even $bits(i). And, because I don't know this, I don't know what effect it has on the arithmetic expressions it participates in. -- BradReceived on Tue Sep 5 14:43:40 2006
This archive was generated by hypermail 2.1.8 : Tue Sep 05 2006 - 14:44:03 PDT