projects
/
rrq
/
jonasforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up OS interface
[rrq/jonasforth.git]
/
example.f
diff --git
a/example.f
b/example.f
index 41993d73ba877de3f7c7c72491ecee6318a43d80..38cd6e4e69921d16fb6e9171b3129796161e085f 100644
(file)
--- a/
example.f
+++ b/
example.f
@@
-1,6
+1,3
@@
-( vim: syntax=forth
-)
-
: FIB ( n -- Fn )
0 1 ( n a b )
0 ( n a b i )
: FIB ( n -- Fn )
0 1 ( n a b )
0 ( n a b i )
@@
-13,16
+10,12
@@
DUP 4 PICK = UNTIL
DROP SWAP DROP SWAP DROP ; ( a+b )
DUP 4 PICK = UNTIL
DROP SWAP DROP SWAP DROP ; ( a+b )
-S" HELLO-ADDR" CREATE
-S" Hello!" DUP ROT
-STORE-STRING
-: HELLO
- ' HELLO-ADDR LIT, TELL NEWLINE ;
-
-HELLO
+: HELLO S" Hello!" TELL NEWLINE ;
-S" 10 FIB = " TELL
-10 FIB .U
-SPACE S" (Expected: 59)" TELL NEWLINE
+: TEST-FIB
+ S" 10 FIB = " TELL
+ 10 FIB .U
+ SPACE S" (Expected: 59)" TELL NEWLINE ;
-TERMINATE
+HELLO
+TEST-FIB