summaryrefslogtreecommitdiff
path: root/point.toc
blob: f19f0559b29d4afb65793d1ce3853ab5ca324e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pkg "point";


#export Point ::= struct {
	x, y: int;
};

#export mk_point ::= fn(x, y: int) p : Point {
		 p.x = x;
		 p.y = y;
};

mk_point2 ::= fn(x, y:int) p: Point {
		  p = mk_point(x*x, y*y);
};

#export foo ::= fn(x :: int) int {
		k : Point = 95;
		p:=x[3];
};