source: CIVL/examples/languageFeatures/civlfor.cvl@ 8d298d8

1.23 2.0 main test-branch
Last change on this file since 8d298d8 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: 233 bytes
Line 
1#include <civlc.cvh>
2
3void main(){
4 $range r1 = 1 .. 5;
5 $range r2 = 0 .. 4#-2;
6 $range r3 = 3 .. 9#3;
7 $domain(3) dom = ($domain){r1, r2, r3};
8 int sum = 0;
9
10 $for(int i,j,k : dom){
11 sum += 1;
12 }
13 $assert(sum == 45);
14}
Note: See TracBrowser for help on using the repository browser.