Project

General

Profile

root / branches / compiler / cSharp / ooasCompiler / doc / examples / Tuple.ooas

1
types
2
  MyInt = int [0..42] ;
3
  MyTuple = (MyInt, MyInt) ;
4
  TupleDemo = autocons system
5
  |[
6
  var
7
	theTuple : MyTuple = MyTuple(1,1) 
8
  actions
9
	ctr change1 = requires theTuple = MyTuple(1,1) :
10
		theTuple := MyTuple(1,2) 
11
		end ; 
12
        ctr change2 = requires theTuple[1] = 2 :
13
		theTuple := MyTuple(1,3)
14
                end 
15
  do
16
        change1 [] change2 
17
  od
18
  ]|
19
system
20
	TupleDemo
21