I think that Antara Ghosh is interpreting the LRM correctly. I also think that the 'priority' and 'unique' qualifiers are not a good design. The normal, and traditional, reading of an unqualified if-then-else or case is prioritized anyway, i.e., sequential from top-to-bottom, and the conditions need not be mutually exclusive. The two extra properties of interest in conditionals are uniqueness (mutually-exclusiveness of conditions) and exhaustiveness (all possibilities are covered). I think it would have been much clearer to have two qualifiers saying exactly that: 'unique' : asserting mutually-exclusiveness (but not necessarily exhaustiveness) 'exhaustive' : asserting exhaustiveness (but not necessarily mutually-exclusiveness) (of course, an 'else' or 'default' clause makes things exhaustive). Currently, 'unique' : asserts mutually-exclusiveness and exhaustiveness (no way to say 'mutually-exclusive but not exhaustive?) 'priority' : asserts sequentiality(which is redundant) and exhaustiveness which is not apparent from the choice of word 'priority') Nikhil Maidment, Matthew R wrote: >>From: Antara Ghosh <antarag@interrasystems.com> >>To: sv-bc@server.eda.org >>Subject: interpreation of priority if-else or case statement >> >>Hello, >> >>What is the difference between the behavior of priority if-else/case >>statement and normal (without unique or priority attribute) if-else >>statement? >> >>LRM states "A priority if indicates that a series of if ... >>else ... if >>conditions shall be evaluated in the order listed." But that is the >>inherent behavior of an if-else if statements. The only difference >>between normal if and priority if seems to be the fact that the later >>errors out if there is a condition which is not present in >>if-else ladder. >>Please let me know if I am missing something. >> >>Thanks >>Antara Ghosh > >Received on Tue Mar 29 08:15:32 2005
This archive was generated by hypermail 2.1.8 : Tue Mar 29 2005 - 08:15:37 PST