From ca9c150fc0b67a3d6901594f2d2d2f22017b166e Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Sun, 2 Sep 2007 15:50:48 -0500 Subject: initial import --- test/test.snt | 15 +++++++++++++++ test/test2.snt | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/test.snt create mode 100644 test/test2.snt (limited to 'test') diff --git a/test/test.snt b/test/test.snt new file mode 100644 index 0000000..32f1eab --- /dev/null +++ b/test/test.snt @@ -0,0 +1,15 @@ +: fact_rec + dup 1 != if + dup rot * swap 1 - fact_rec + then +; + +: fact ( recursive factorial function ) + 1 swap fact_rec pop +; + +: main + 1 begin + dup ": strcat 15 fact spacecat notify + 1 + dup 1000 > until +; diff --git a/test/test2.snt b/test/test2.snt new file mode 100644 index 0000000..e02d7b5 --- /dev/null +++ b/test/test2.snt @@ -0,0 +1,8 @@ +: test + begin + 1 + dup notify + dup 10 > if ; then + repeat ; + +: main + 0 test ; -- cgit v1.2.3-54-g00ecf