source:
CIVL/mods/dev.civl.abc/examples/preproc/expressions.txt
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 301 bytes | |
| Rev | Line | |
|---|---|---|
| [aad342c] | 1 | /* Test for expression evaluation. Modulo white space, the output should |
| 2 | * be "RIGHT RIGHT RIGHT ...". | |
| 3 | */ | |
| 4 | ||
| 5 | #define X 3 | |
| 6 | #define Y 2 | |
| 7 | #if X+Y==5 | |
| 8 | RIGHT | |
| 9 | #else | |
| 10 | #error "WRONG 1" | |
| 11 | #endif | |
| 12 | ||
| 13 | #if X*Y<=6 | |
| 14 | RIGHT | |
| 15 | #else | |
| 16 | #error "WRONG 2" | |
| 17 | #endif | |
| 18 | ||
| 19 | #if defined X && defined(Y) && X>3 | |
| 20 | #error "WRONG 3" | |
| 21 | #else | |
| 22 | RIGHT | |
| 23 | #endif |
Note:
See TracBrowser
for help on using the repository browser.
