Deutsch   English   Français   Italiano  
<9bb57132c366402e72186ec8bbfe7eefdf085bbb@i2pn2.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Number parsing with checks
Date: Sun, 13 Oct 2024 13:59:55 +1100
Organization: i2pn2 (i2pn.org)
Message-ID: <9bb57132c366402e72186ec8bbfe7eefdf085bbb@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: 8bit
Injection-Date: Sun, 13 Oct 2024 02:59:57 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="1787500"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <vefaq8$gn8u$1@dont-email.me>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 1834
Lines: 20

On 13/10/2024 1:20 pm, Ruvim wrote:
> On 2024-10-13 05:13, dxf wrote:
>> On 13/10/2024 12:54 am, Ruvim wrote:
>>> On 2024-10-12 05:45, dxf wrote:
>>>> The basics:
>>>>
>>>> : .BAD ( -- )  cr ." Invalid item"  .abort ;
>>>>
>>>> : ZE? ( x -- )  if .bad then ;     \ abort if non-zero
>>>> : NZ? ( x -- )  0= ze? ;           \ abort if zero
>>>
>>> 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)
>>
>> It's rather similar.
>>
>> ZE? NZ?  destructively tests TOS
> 
> But these words do not return a flag in the first output parameter. So, their names violate the common convention.

Conventions are a guide.  Thankfully they're not yet a law.