git.annexia.org
/
jonesforth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac014bc
)
Basic stack tests
author
rich
<rich>
Thu, 11 Oct 2007 07:40:21 +0000
(07:40 +0000)
committer
rich
<rich>
Thu, 11 Oct 2007 07:40:21 +0000
(07:40 +0000)
test_stack.f
[new file with mode: 0644]
patch
|
blob
test_stack.f.out
[new file with mode: 0644]
patch
|
blob
diff --git a/test_stack.f
b/test_stack.f
new file mode 100644
(file)
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
(file)
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