ch3-Case
2019-10-24
unique,unique0 case
All case statements can be qualified by unique
or unique0
keywords to perform violation checks like we saw in if-else-if construct.
unique
and unique0
ensure that there is no overlapping case items and hence can be evaluated in parallel. If there are overlapping case items, then a violation is reported.
- If more than one case item is found to match the given expression, then a violation is reported and the first matching expression is executed
- If no case item is found to match the given expression, then a violation is reported only for
unqiue
unique0 does not report a violation if no items match the expression
priority case
类似priority if,如果匹配到零个分支,报错;匹配到第一个分支就退出。
1 |
|
Simulation Log
1 |
|
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!