source: CIVL/examples/specialStatements/choose1.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

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

  • Property mode set to 100644
File size: 360 bytes
RevLine 
[f654c25]1#include<civlc.cvh>
2
[d66b03b]3$scope root = $here;
[f654c25]4int main(){
5 int *ptr, x=1, y=2;
6
7 $choose{
8 if(x<=1){
9 int a1=0;
10 y=a1;
11 }else{
12 y=x+1;
13 }
14 $when(x<5){
15 $when(y>1){
16 y=10;
17 int z=19;
18 x=z;
19 }
20 }
[d66b03b]21 {ptr=(int*)$malloc(root, sizeof(int)); $free(ptr);}
[f654c25]22 {int q=sizeof(int); ptr=(int*)$malloc($here, q); $free(ptr);}
23 }
24}
Note: See TracBrowser for help on using the repository browser.