From: rich Date: Thu, 11 Oct 2007 07:40:21 +0000 (+0000) Subject: Basic stack tests X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a28fd94bb9711f62659bc89a275af9eb7134bece;p=jonesforth.git Basic stack tests --- diff --git a/test_stack.f b/test_stack.f new file mode 100644 index 0000000..e8e558d --- /dev/null +++ b/test_stack.f @@ -0,0 +1,17 @@ +( -*- text -*- ) + +: TEST + DEPTH . CR + + 42 DUP . . CR + 23 DROP DEPTH . CR + 1 2 SWAP . . CR + 1 2 OVER . . . CR + 1 2 3 ROT . . . CR + 1 2 3 -ROT . . . CR + 1 2 3 4 2DROP . . CR + 1 2 3 4 2DUP . . . . . . CR + 1 2 3 4 2SWAP . . . . CR + + DEPTH . CR +; diff --git a/test_stack.f.out b/test_stack.f.out new file mode 100644 index 0000000..e6d6204 --- /dev/null +++ b/test_stack.f.out @@ -0,0 +1,11 @@ +0 +42 42 +0 +1 2 +1 2 1 +2 1 3 +1 3 2 +2 1 +4 3 4 3 2 1 +2 1 4 3 +0