From b1e4e89b843448058b5a4f076e0b6e0d3c51dfcb Mon Sep 17 00:00:00 2001 From: zlarsen Date: Fri, 9 Oct 2015 13:59:25 -0600 Subject: fixes forth typo changes util to until --- forth.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth.html.markdown') diff --git a/forth.html.markdown b/forth.html.markdown index f7c0bf34..1db85bf0 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -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` `unil`: +\ Indefinite loops with `begin` `until`: : death ( -- ) begin ." Are we there yet?" 0 until ; \ ok \ ---------------------------- Variables and Memory ---------------------------- -- cgit v1.2.3 From d49265b30fb6a6bc5a9574c59e043f9a18e0a96d Mon Sep 17 00:00:00 2001 From: zlarsen Date: Fri, 9 Oct 2015 15:22:34 -0600 Subject: Fixes another Forth typo --- forth.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth.html.markdown') diff --git a/forth.html.markdown b/forth.html.markdown index f7c0bf34..5c161746 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -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 -- cgit v1.2.3 From 03da44dd0b5ef9e351adf5881c25d1d25803c496 Mon Sep 17 00:00:00 2001 From: Jacob Ward Date: Mon, 14 Mar 2016 10:26:18 -0600 Subject: [forth/en] don't -> don't --- forth.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth.html.markdown') diff --git a/forth.html.markdown b/forth.html.markdown index b4a5581b..55d755b2 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -54,7 +54,7 @@ Forth, but most of what is written here should work elsewhere. 3 dup - \ duplicate the top item (1st now equals 2nd): 3 - 3 2 5 swap / \ swap the top with the second element: 5 / 2 6 4 5 rot .s \ rotate the top 3 elements: 4 5 6 -4 0 drop 2 / \ remove the top item (dont print to screen): 4 / 2 +4 0 drop 2 / \ remove the top item (don't print to screen): 4 / 2 1 2 3 nip .s \ remove the second item (similar to drop): 1 3 \ ---------------------- More Advanced Stack Manipulation ---------------------- -- cgit v1.2.3 From 921952f852652e282a56b09928697255698c65bf Mon Sep 17 00:00:00 2001 From: Jesse Paroz Date: Sun, 1 Jan 2017 13:46:13 +1000 Subject: Use forth syntax highlighting --- forth.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth.html.markdown') diff --git a/forth.html.markdown b/forth.html.markdown index 55d755b2..09f3beb0 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 ) -- cgit v1.2.3 From 6b8264756b574be0af84e0a8a104cfa75c0027bb Mon Sep 17 00:00:00 2001 From: "Joseph Gabriel J. Adaoag" Date: Fri, 13 Oct 2017 16:20:14 +0800 Subject: Fix tuck definition --- forth.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth.html.markdown') diff --git a/forth.html.markdown b/forth.html.markdown index 09f3beb0..ff094017 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -59,7 +59,7 @@ Forth, but most of what is written here should work elsewhere. \ ---------------------- More Advanced Stack Manipulation ---------------------- -1 2 3 4 tuck \ duplicate the top item into the second slot: 1 2 4 3 4 ok +1 2 3 4 tuck \ duplicate the top item below the second slot: 1 2 4 3 4 ok 1 2 3 4 over \ duplicate the second item to the top: 1 2 3 4 3 ok 1 2 3 4 2 roll \ *move* the item at that position to the top: 1 3 4 2 ok 1 2 3 4 2 pick \ *duplicate* the item at that position to the top: 1 2 3 4 2 ok -- cgit v1.2.3