Re: named wordlist

Liste des GroupesRevenir à cl forth 
Sujet : Re: named wordlist
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forth
Date : 30. Oct 2024, 21:37:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vfu5em$2a79p$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 2024-10-30 22:38, Anton Ertl wrote:
Ruvim <ruvim.pinka@gmail.com> writes:
When a word list is created with `vocabulary`, it is associated with a
name, and `order` displays this name in its output.
>
When a word list is created by `wordlist`, it is not associated with a
name. Therefore, `order` typically displays a number for that word list,
which is less informative.
>
A Forth system might try to find a constant whose value is identical to
the wid of such word list and display the name of the constant. Do you
know if this approach is used anywhere?
 Gforth 0.7.9_20241016
...
wordlist constant foo  ok
foo >order  ok
order foo Forth Forth Root     Forth  ok
wordlist  ok 1
variable bla  ok 1
constant bar  ok
bar >order  ok
order <139623990855032> foo Forth Forth Root     Forth  ok
 I.e., Gforth supports the usage
 wordlist constant foo
 in ORDER, but not the general case.
Anyway, that's cool!

Some Forth systems technically can associate a name with a word list
after the word list is created with `wordlist`. And some even provide an
API for doing so.
 All standard Forth systems support CONSTANT.  Or what do you mean with
"associate a name with a word list"?
Probably, "name" is not an appropriate term.
I mean, associate a character string with a wid so that `order` displays this string for that wid when outputting the search order.
--
Ruvim

Date Sujet#  Auteur
30 Oct 24 * named wordlist7Ruvim
30 Oct 24 +* Re: named wordlist3albert
30 Oct 24 i`* Re: named wordlist2Ruvim
1 Nov 24 i `- Re: named wordlist1Ruvim
30 Oct 24 +* Re: named wordlist2Anton Ertl
30 Oct 24 i`- Re: named wordlist1Ruvim
1 Nov 24 `- Re: named wordlist1albert

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal