Re: Number parsing with checks

Liste des GroupesRevenir à cl forth 
Sujet : Re: Number parsing with checks
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forth
Date : 12. Oct 2024, 17:40:07
Autres entêtes
Organisation : novaBBS
Message-ID : <b4ac031269d3b4b4db45f7113cd7da23@www.novabbs.com>
References : 1 2 3
User-Agent : Rocksolid Light
On Sat, 12 Oct 2024 14:46:52 +0000, Ruvim wrote:

On 2024-10-12 17:54, Ruvim wrote:
On 2024-10-12 05:45, dxf wrote:
The basics:
[..]
: 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)
>
These are better names and narrower stack diagrams:
>
   DROP-NZ ( x\0 --  |  0 -- never )
   DROP-ZE ( 0 --  |  x\0 -- never )
>
I do not like these names too.
>
These seem better:
>
     ?NZ-DROP
     ?ZE-DROP
[..]
My convention has always been that if a word starts with
a '?', it tests and [possibly] aborts. This makes
'-DROP' unnecessary.
-marcel

Date Sujet#  Auteur
12 Oct 24 * Number parsing with checks17dxf
12 Oct 24 `* Re: Number parsing with checks16Ruvim
12 Oct 24  +* Re: Number parsing with checks4Ruvim
12 Oct 24  i`* Re: Number parsing with checks3mhx
12 Oct 24  i +- Re: Number parsing with checks1Ruvim
14 Oct 24  i `- Re: Number parsing with checks1Stephen Pelc
13 Oct 24  `* Re: Number parsing with checks11dxf
13 Oct 24   `* Re: Number parsing with checks10Ruvim
13 Oct 24    +* Re: Number parsing with checks8dxf
13 Oct 24    i`* Naming conventions (was: Number parsing with checks)7Ruvim
13 Oct 24    i `* Re: Naming conventions6dxf
13 Oct 24    i  +* Re: Naming conventions3Ruvim
13 Oct 24    i  i+- Re: Naming conventions1mhx
14 Oct 24    i  i`- Re: Naming conventions1dxf
14 Oct 24    i  `* Re: Naming conventions2Ruvim
14 Oct 24    i   `- Re: Naming conventions1dxf
14 Oct 24    `- Re: Number parsing with checks1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal