Re: Naming 'n' instances or repetitions

Liste des GroupesRevenir à cl forth 
Sujet : Re: Naming 'n' instances or repetitions
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forth
Date : 25. May 2025, 04:17:15
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <2397304e33ac8d6e4550216a4490170e40bdc15b@i2pn2.org>
References : 1 2
User-Agent : Mozilla Thunderbird
On 24/05/2025 11:50 pm, Ruvim wrote:
On 2025-05-22 07:34, dxf wrote:
I've noticed two ways of naming things 'done n times'.
>
In SwiftForth there is:
>
   (.0) (H.0)
>
which equate to executing '#' 'n' times.
>
It's not clear to me why '0' was used though '0' appears in forth naming
conventions meaning 'initialization'.
>
In VFX Forth (and perhaps others) there is:
>
   NDROP
>
where 'n' indicates number of executions.
 
 
In the word names like `ndrop`, `n>r`, `nr>` I consider `n` as an indicator of the data type on which these words operate.

In the definitions for N>R NR> (I'd forgotten about them) 'n' is plainly a
quantity e.g.

  "Remove n+1 items from the data stack [...]"

...
 
In the word `shold`, `s` could indicate the character string data type, that is ( c-addr u ), but this name does not read very well because of the `sh` phoneme.

But SLITERAL was ok?

Prefixing in forth comes from the days when names were 3 chars plus count.  While
that's no longer so important it is still beneficial to put distinguishing
information first.

SHOLD was developed independently.  Had I known HOLDS existed, I would have been
torn as I had NHOLD to consider.  AFAIK HOLDS was a by-product of the XCHAR proposal.
SHOLD NHOLD were by-products of my floating point output package - which was mostly
an exercise in numeric string manipulation.


Date Sujet#  Auteur
22 May 25 * Naming 'n' instances or repetitions9dxf
22 May 25 +* Re: Naming 'n' instances or repetitions2Anton Ertl
22 May 25 i`- Re: Naming 'n' instances or repetitions1dxf
23 May 25 +- Re: Naming 'n' instances or repetitions1dxf
23 May 25 +* Re: Naming 'n' instances or repetitions2Hans Bezemer
24 May 25 i`- Re: Naming 'n' instances or repetitions1dxf
24 May 25 `* Re: Naming 'n' instances or repetitions3Ruvim
24 May 25  +- Re: Naming 'n' instances or repetitions1albert
25 May 25  `- Re: Naming 'n' instances or repetitions1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal