home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,951 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,916 of 117,951   
   Ruvim to Anton Ertl   
   Re: named wordlist   
   31 Oct 24 00:37:40   
   
   From: ruvim.pinka@gmail.com   
      
   On 2024-10-30 22:38, Anton Ertl wrote:   
   > 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.   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca