From b018e2f9e84edeb742f91c9cc8d06469465fb52a Mon Sep 17 00:00:00 2001 From: Joe <8309575+joekreydt@users.noreply.github.com> Date: Sat, 18 Jan 2020 22:16:02 -0500 Subject: [PATCH] Begin Until explanation fix Begin Until stops looping when the value on top of the stack is true. The explanation in the tutorial makes it seem as though the loop stops when the value is false. --- index.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.markdown b/index.markdown index 78e0ce3..d773076 100644 --- a/index.markdown +++ b/index.markdown @@ -682,7 +682,7 @@ Now hit `B`, then `C`, and you should see the following: Forth has another kind of loop called `begin until`. This works like a `while` loop in C-based languages. Every time the word `until` is hit, the interpreter -checks to see if the top of the stack is non-zero (true). If it is, it jumps +checks to see if the top of the stack is non-zero (true). If it is false, it jumps back to the matching `begin`. If not, execution continues. Here's an example of using `begin until` to print key codes: