source: CIVL/examples/languageFeatures/choose.cvl@ e275f74

1.23 2.0 main test-branch
Last change on this file since e275f74 was e6b02c8, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

updates CIVL to use the new ABC FrontEnd. tests updated accordingly when necessary.

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

  • Property mode set to 100644
File size: 258 bytes
Line 
1/* Commandline execution:
2 * civl verify choose.cvl
3 * */
4#include<civlc.cvh>
5
6int n = 2;
7float x;
8
9void main() {
10l1:
11 $choose {
12 $when (n>2) { x=2; goto l2; }
13 $when (n>1) { x=1; goto l2; }
14 default: {x=0; goto l2; }
15 }
16l2: ;
17#assert x == 1;
18}
19
Note: See TracBrowser for help on using the repository browser.