Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: named wordlist Date: Wed, 30 Oct 2024 18:38:57 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 42 Message-ID: <2024Oct30.193857@mips.complang.tuwien.ac.at> References: Injection-Date: Wed, 30 Oct 2024 19:42:35 +0100 (CET) Injection-Info: dont-email.me; posting-host="13b00adb381e39ee8c2c5d76102647ff"; logging-data="2393128"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tiR0A403nROTEnvkzP2SM" Cancel-Lock: sha1:673/Gn53waIFpNfMaw7Gfk9mCig= X-newsreader: xrn 10.11 Bytes: 2250 Ruvim 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.html comp.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