source: CIVL/examples/languageFeatures/initialValues.cvl@ b2a2faa

1.23 2.0 main test-branch
Last change on this file since b2a2faa was 0d65e23, checked in by Ziqing Luo <ziqing@…>, 11 years ago

let the example cover more

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

  • Property mode set to 100644
File size: 431 bytes
RevLine 
[8dbb964]1#include<stdio.h>
2#include<civlc.cvh>
3#include<bundle.cvh>
4
[ed25e58]5typedef enum INIT {zero, one} Init;
[0d65e23]6typedef union{
7int a;
8float b;
9} MyUnion;
[ed25e58]10
[8dbb964]11$domain dom0;
12$domain(2) dom2;
13$bundle bun;
[ed25e58]14Init enumVar;
15int * ptr;
[0d65e23]16MyUnion myunion;
[8dbb964]17int main() {
18 int a;
19
20 $elaborate_rectangular_domain(dom0);
21 $elaborate_rectangular_domain(dom2);
[ed25e58]22 a = enumVar;
[0d65e23]23 a = myunion.a;
[ed25e58]24 ptr = &a;
[8dbb964]25 $bundle_unpack(bun, &a);
26 return 0;
27}
Note: See TracBrowser for help on using the repository browser.