| Deutsch English Français Italiano |
|
<vfu5em$2a79p$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ruvim <ruvim.pinka@gmail.com> Newsgroups: comp.lang.forth Subject: Re: named wordlist Date: Thu, 31 Oct 2024 00:37:40 +0400 Organization: A noiseless patient Spider Lines: 49 Message-ID: <vfu5em$2a79p$1@dont-email.me> References: <vfslvv$20cbt$1@dont-email.me> <2024Oct30.193857@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 30 Oct 2024 21:37:42 +0100 (CET) Injection-Info: dont-email.me; posting-host="21d5d8db8a2436ea5f354446be4e4bf4"; logging-data="2432313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hf/aVYlebpUpzA4OdkQPI" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:fy40lihyG3AtRLNbwKh9nbV9iFs= In-Reply-To: <2024Oct30.193857@mips.complang.tuwien.ac.at> Content-Language: en-US Bytes: 2512 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