From 343a62e4d1a357c7c6b6a7cace3bab4703ffd7cc Mon Sep 17 00:00:00 2001 From: crc Date: Thu, 12 Apr 2018 11:22:37 +0000 Subject: [PATCH] clarify flags with until and while (thanks kioyshi) FossilOrigin-Name: afc1e7676eb15181b969bd519b634486cbed446b69e105677b198fc839a8c89e --- doc/Glossary.txt | 4 ++-- words.tsv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Glossary.txt b/doc/Glossary.txt index 10683fb..d9e3066 100644 --- a/doc/Glossary.txt +++ b/doc/Glossary.txt @@ -4586,7 +4586,7 @@ until Addr: - Float: - -Execute quote repeatedly while the quote returns a value of `FALSE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this. +Execute quote repeatedly while the quote returns a value of `FALSE`. The quote should return a flag of either `TRUE` or `FALSE`, though `until` will treat any non-zero value as `TRUE`. Class Handler: class:word | Namespace: global | Interface Layer: all @@ -4743,7 +4743,7 @@ while Addr: - Float: - -Execute quote repeatedly while the quote returns a value of `TRUE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this. +Execute quote repeatedly while the quote returns a `TRUE` value. The quote should return a flag of either `TRUE` or `FALSE`, though `while` will treat any non-zero value as `TRUE`. Class Handler: class:word | Namespace: global | Interface Layer: all diff --git a/words.tsv b/words.tsv index 7f32703..4ea1a68 100644 --- a/words.tsv +++ b/words.tsv @@ -358,7 +358,7 @@ unix:sleep n- - - Sleep for the specified number of seconds. class:word {n/a} unix:system s- - - Runs another application using the system shell and returns after execution is completed. class:word 'ls_-lh_/etc unix:system {n/a} unix rre unix:wait -n - - Waits for a child process to complete. This maps to the wait() system call. class:word {n/a} {n/a} unix rre unix:write sh- - - Write a string to the specified file handle. class:word {n/a} {n/a} unix rre -until q- - - Execute quote repeatedly while the quote returns a value of `FALSE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this. class:word #10 [ dup putn nl n:dec dup n:zero? ] until {n/a} global all +until q- - - Execute quote repeatedly while the quote returns a value of `FALSE`. The quote should return a flag of either `TRUE` or `FALSE`, though `until` will treat any non-zero value as `TRUE`. class:word #10 [ dup putn nl n:dec dup n:zero? ] until {n/a} global all v:dec a- - - Decrement the value stored at the specified address by 1. class:word {n/a} {n/a} v all v:dec-by na- - - Decrement the value stored at the specified address by the specified value. class:word {n/a} {n/a} v all v:inc a- - - Increment the value stored at the specified address by 1. class:word {n/a} {n/a} v all @@ -370,7 +370,7 @@ v:preserve aq- - - Make a copy of the value at the address, then run the quote. v:update-using aq- - - Fetch a value from the specified address, then run the quotation with this value on the stack. Afterwards, store the returned value at the original address. class:word {n/a} {n/a} v all var s- - - Create a variable. The variable is initialized to 0. class:word 'Base var {n/a} global all var ns- - - Create a variable with the specified initial value. class:word #10 'Base var\n {n/a} global all -while q- - - Execute quote repeatedly while the quote returns a value of `TRUE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this. class:word #10 [ dup putn nl n:dec dup n:-zero? ] while {n/a} global all +while q- - - Execute quote repeatedly while the quote returns a `TRUE` value. The quote should return a flag of either `TRUE` or `FALSE`, though `while` will treat any non-zero value as `TRUE`. class:word #10 [ dup putn nl n:dec dup n:-zero? ] while {n/a} global all words - - - Display a list of all named items in the `Dictionary`. class:word {n/a} {n/a} global all xor mn-o - - Perform a bitwise XOR operation. class:primitive {n/a} {n/a} global all {{ - - - Begin a lexically scoped area. class:word {n/a} {n/a} global all