| Deutsch English Français Italiano |
|
<346818c923794a45a2efc6b0eb9c962e9f0776b8@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Number parsing with checks
Date: Mon, 14 Oct 2024 21:52:31 +1100
Organization: i2pn2 (i2pn.org)
Message-ID: <346818c923794a45a2efc6b0eb9c962e9f0776b8@i2pn2.org>
References: <636c943eae41d9a5832ce5a94414cb81be04a44f@i2pn2.org>
<vedv35$6b05$1@dont-email.me>
<59b4fdfd0718fbe6e37c645925b7bf0b5ac86dde@i2pn2.org>
<vefaq8$gn8u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Oct 2024 10:52:31 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="1984933"; mail-complaints-to="usenet@i2pn2.org";
posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
In-Reply-To: <vefaq8$gn8u$1@dont-email.me>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Content-Language: en-GB
Bytes: 2119
Lines: 26
On 13/10/2024 1:20 pm, Ruvim wrote:
> ...
> > Typically, if word name ends with a question mark, the first (top) output
> > parameter of the word is a *flag*. And it's true for all standard words.
> > (though, opposite is not true)
> ...
> These names follow the common convention. A question mark at the beginning of
> a name means that the word does something or does nothing depending on certain
> conditions.
>
> Well known nonstandard words: `?stack` `?csp` `?comp` `?exec`
> Standard words: `?do` `?dup`
Here is Forth Inc's convention as provided in Forth Programmer's Handbook.
It appears more flexible than what you describe above.
?name Check condition, return true if yes ?TERMINAL
Conditional operator ?DUP
Check condition, abort if bad ?STACK
Fetch contents of name and display ?N
[..]
name? Same as ?name B?
The lack of differentiation between ?NAME and NAME? is likely due to early
forth storing names as 3 characters plus count.