Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic stack tests

  • Loading branch information...
commit a28fd94bb9711f62659bc89a275af9eb7134bece 1 parent ac014bc
rich authored
Showing with 28 additions and 0 deletions.
  1. +17 −0 test_stack.f
  2. +11 −0 test_stack.f.out
View
17 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
+;
View
11 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
Please sign in to comment.
Something went wrong with that request. Please try again.