diff options
Diffstat (limited to 'point.toc')
-rw-r--r-- | point.toc | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,5 +1,9 @@ pkg "point"; + +#export Point ::= struct { + x, y: int; +}; bar ::= fn() []int { x:[]int = new(int,20); each p, i := &x { @@ -11,20 +15,19 @@ bar ::= fn() []int { #export x ::= bar(); -#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]; + // k : Point = 95; + // p:=x[3]; }; +#export a:=5;
\ No newline at end of file |