source: CIVL/examples/languageFeatures/continue.cvl@ 90dd7d7

1.23 2.0 main test-branch
Last change on this file since 90dd7d7 was 420d7f3, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

Added support for switch statements, continue, break.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@216 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 356 bytes
Line 
1#include <civlc.h>
2
3void main() {
4 for (int i = 0; i < 5; i++) {
5 for (int j = 0; j < 5; j++) {
6 for (int k = 0; k < 7; k++) {
7 if (k < 4) {
8 continue;
9 }
10 $assert k >= 4;
11 }
12 if (j > 3) {
13 continue;
14 }
15 $assert j <= 3;
16 }
17 if (i <= 2) {
18 continue;
19 }
20 $assert i > 2;
21 }
22}
Note: See TracBrowser for help on using the repository browser.