source:
CIVL/mods/dev.civl.com/examples/sideEffects/complexShortCircuitLoopConditions.cvl@
8553be8
| Last change on this file since 8553be8 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 171 bytes | |
| Line | |
|---|---|
| 1 | #include <assert.h> |
| 2 | int main() { |
| 3 | int x = 1; |
| 4 | int y = 2; |
| 5 | int z = 3; |
| 6 | |
| 7 | while (( x == y+1 && y > z ) + 1 >= 1 && z < 5) { |
| 8 | z++; |
| 9 | } |
| 10 | assert(z == 5); |
| 11 | return 0; |
| 12 | |
| 13 | } |
Note:
See TracBrowser
for help on using the repository browser.
