summaryrefslogtreecommitdiff
path: root/point.toc
diff options
context:
space:
mode:
Diffstat (limited to 'point.toc')
-rw-r--r--point.toc12
1 files changed, 11 insertions, 1 deletions
diff --git a/point.toc b/point.toc
index f19f055..57be671 100644
--- a/point.toc
+++ b/point.toc
@@ -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
+};