LIT WORD! if in a "live" context, the expert evaluates his word. It can be used to suppress scores simply with a single token when you want to pass the WORD! value for the function. (Of course, in your own dialects, when you play the role of "evaluator", this is the game "Tinker Toy", and you can do what you want.)
If you would like to get a real LIT-WORD! you have to somehow suppress the appraiser, turning him into a WORD !. You noticed that this can be achieved by selecting it from an unvalued block, for example, using first ['x] . But a more “correct” way is to use quote 'x :
>> type? quote 'x == lit-word!
Beware of the odd bug known as "lit-word decay":
>> x-lit: quote 'x >> type? x-lit == word!
This has been fixed in red and is awaiting correction in Rebol. Until then, you should use GET-WORD! to extract the meaning of the lighted word from the variable holding it:
>> x-lit: quote 'x >> type? :x-lit == lit-word!
(You may have already come across this practice as a way to get the meaning of a word or “run” it through the evaluator ... just as if you wanted to deal with the value of a function and call it. You do not need the values to hold the word-word ! .. It would seem an accident of history.)
Hostilefork
source share