diff options
Diffstat (limited to 'forth.html.markdown')
-rw-r--r-- | forth.html.markdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/forth.html.markdown b/forth.html.markdown index 570e12ed..b4a5581b 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -12,7 +12,7 @@ such as Open Firmware. It's also used by NASA. Note: This article focuses predominantly on the Gforth implementation of Forth, but most of what is written here should work elsewhere. -```forth +``` \ This is a comment ( This is also a comment but it's only used when defining words ) @@ -117,7 +117,7 @@ one-to-12 \ 0 1 2 3 4 5 6 7 8 9 10 11 12 ok : threes ( n n -- ) ?do i . 3 +loop ; \ ok 15 0 threes \ 0 3 6 9 12 ok -\ Indefinite loops with `begin` <stuff to do> <flag> `unil`: +\ Indefinite loops with `begin` <stuff to do> <flag> `until`: : death ( -- ) begin ." Are we there yet?" 0 until ; \ ok \ ---------------------------- Variables and Memory ---------------------------- @@ -133,7 +133,7 @@ variable age \ ok age @ . \ 21 ok age ? \ 21 ok -\ Constants are quite simiar, except we don't bother with memory addresses: +\ Constants are quite similar, except we don't bother with memory addresses: 100 constant WATER-BOILING-POINT \ ok WATER-BOILING-POINT . \ 100 ok |