summaryrefslogtreecommitdiff
path: root/point.toc
blob: 8bf54256e3993a784b32206972d7b8c7ff73c9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
};