Ladislav Thanks for the alternative though it which wasn't quite what I was looking for. Actually, my motivation was to find a 'constant' for Jeff Massung ( http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display- message.r?m=rmlRSSC ).
In my limited understanding, the only constant values in a Rebol script are literals in the source (prior to evaluation). Assuming the #define exists, it would be possible to write: #define FREEZING-POINT 0 if temperature < FREEZING-POINT [Print "I must be somewhere cold"] which would get pre-processed to >> if temperature < 0 [Print "I must be somewhere cold"] I must be somewhere cold but not: FREEZING-POINT: 100 as it would get pre-processed to >> 0: 100 ** Syntax Error: Invalid time -- 0: ** Near: (line 1) 0: 100 Am I correct? Regards Peter On Tuesday, May 9, 2006, at 06:37 Asia/Kuala_Lumpur, Ladislav Mecir napsal(a): > > Peter Wood napsal(a): >> Ladislav >> >> Your include looks really useful. Would it be possible to add a >> #define >> "command" that performed a simple text substitutions on the included >> file ? >> >> eg #define FREEZING-POINT 0 >> >> Regards >> >> Peter >> > such an option exists even now, even though it may look slightly > "inelegant" to you. Example: > > ; define FREEZING-POINT constant > ; notice the empty block causing that nothing is actually included > #do [FREEZING-POINT: 0 []] > ; use constant substitution in the following expression: > if temperature < #do [FREEZING-POINT] [print "it's cold"] > > -L > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
