Summary: | wrong operator precedence in the documentation | ||
---|---|---|---|
Product: | UPPAAL | Reporter: | Marius Mikučionis <marius> |
Component: | Documentation | Assignee: | Marius Mikučionis <marius> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | adavid, johnh |
Priority: | P5 | ||
Version: | 4.0.14 | ||
Hardware: | All | ||
OS: | All | ||
Architecture: |
Description
Marius Mikučionis
2017-08-04 13:46:55 CEST
Here is a test expression: not true && false According to the documentation in 4.0.14 the "&&" operator has higher precedence over "not" and hence the expression should compute to "true", but the implementation computes "false". The behavior (of computing "false") is consistent with alternative operators in C++ (see http://en.cppreference.com/w/cpp/language/operator_alternative ). Whereas C does not allow "bool" and other keywords keywords. Just found that C99 supports the keywords by including the following: #include <stdbool.h> // bool, true, false #include <iso646.h> // not, and, or The behavior is consistent with C++ (and Uppaal implementation). |