summaryrefslogtreecommitdiffhomepage
path: root/forth.html.markdown
diff options
context:
space:
mode:
authorHorseMD <alightedness@gmail.com>2014-11-14 00:05:48 +0000
committerHorseMD <alightedness@gmail.com>2014-11-14 00:05:48 +0000
commit601f06e72d48ce0d16f9d34dc1f74418eddae654 (patch)
treed252f386923a77169ff4cb12dd7c424f384cd562 /forth.html.markdown
parent6cf6ce36684e38a5aaacde58be1cd83d58cebd8f (diff)
Whoops, make lowercase.
Diffstat (limited to 'forth.html.markdown')
-rw-r--r--forth.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/forth.html.markdown b/forth.html.markdown
index 0e3cdd2a..e799655b 100644
--- a/forth.html.markdown
+++ b/forth.html.markdown
@@ -83,11 +83,11 @@ see square \ dup * ; ok
\ `if` is a *compile-only word*. This means that it can only be used when we're
\ compiling a word. The format is `if` <stuff to do> `then` <rest of program>.
-: ?>64 ( n -- n ) DUP 64 > if ." Greater than 64!" then ; \ ok
+: ?>64 ( n -- n ) dup 64 > if ." Greater than 64!" then ; \ ok
100 ?>64 \ Greater than 64! ok
\ Else:
-: ?>64 ( n -- n ) DUP 64 > if ." Greater than 64!" else ." Less than 64!" then ;
+: ?>64 ( n -- n ) dup 64 > if ." Greater than 64!" else ." Less than 64!" then ;
100 ?>64 \ Greater than 64! ok
20 ?>64 \ Less than 64! ok
@@ -108,7 +108,7 @@ myloop
\ We can get the value of the index as we loop with `i`:
: one-to-12 ( -- ) 12 0 do i . loop ; \ ok
one-to-12 \ 0 1 2 3 4 5 6 7 8 9 10 11 12 ok
-: squares ( -- ) 10 0 do i DUP * . loop ; \ ok
+: squares ( -- ) 10 0 do i dup * . loop ; \ ok
squares \ 0 1 4 9 16 25 36 49 64 81 ok
\ Change the "step" with `+loop`: