Project

General

Profile

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

1 3 krennw
types
2
  Class1 = autocons system
3
  |[
4
  var
5
	O2 : Class2 = new (Class2);
6
	O3 : Class3 = new (Class3);
7
	OL : list[2] of Class2 = [nil]
8
  actions
9
	ctr fill = requires true :
10
		OL := [O2]^[O3 as Class2]
11
		end
12
  do
13
        fill
14
  od
15
  ]| ;
16
  Class2 = system
17
  |[
18
  ]| ;
19
  Class3 = system (Class2)
20
  |[
21
  ]|
22
system
23
        Class1