Sujet : Re: named wordlist
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 30. Oct 2024, 19:38:57
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Oct30.193857@mips.complang.tuwien.ac.at>
References : 1
User-Agent : xrn 10.11
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.
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"?
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net