Re: Number parsing with checks

Liste des GroupesRevenir à cl forth 
Sujet : Re: Number parsing with checks
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forth
Date : 14. Oct 2024, 11:52:31
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <346818c923794a45a2efc6b0eb9c962e9f0776b8@i2pn2.org>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
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.


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