diff options
Diffstat (limited to 'point.toc')
-rw-r--r-- | point.toc | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,15 @@ pkg "point"; +bar ::= fn() []int { + x:[]int = new(int,20); + each p, i := &x { + *p = i; + } + x +}; + + +#export x ::= bar(); #export Point ::= struct { x, y: int; @@ -17,4 +27,4 @@ mk_point2 ::= fn(x, y:int) p: Point { #export foo ::= fn(x :: int) int { k : Point = 95; p:=x[3]; -};
\ No newline at end of file +}; |