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