source:
CIVL/examples/languageFeatures/scoping.cvl@
38b7d06
| Last change on this file since 38b7d06 was 793cfc2, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 158 bytes | |
| Line | |
|---|---|
| 1 | #include <civlc.h> |
| 2 | |
| 3 | void main() { |
| 4 | int x = 0; |
| 5 | |
| 6 | for (int i = 0; i < 5; i++) { |
| 7 | int x = i + 1; |
| 8 | x++; |
| 9 | $assert x == i + 2; |
| 10 | } |
| 11 | $assert x == 0; |
| 12 | } |
Note:
See TracBrowser
for help on using the repository browser.
