On 12/30/1999 at 11:31 AM [EMAIL PROTECTED] wrote:
{{
>>f: func [] [print "Executed"]
>>(((:f)))
}}
And then consider this:
>> print :f
?function?
I think in your examples REBOL is returning an internal reference to 'f
which it can't or won't express at the console. The value returned is
usually bound to a word, and not meant for human eyes. I'd say that
this is just a practical expection to how REBOL uses the console.
To print the value at the console, REBOL would have to devise a way to
express those references, but that wouldn't be useful, since we can
only use the references when they are bound to a word (or automatically
as part of a larger expression).
{{
>> do head insert copy [] do [:f]
Executed
}}
Here, we are creating a block, inserting a reference to the value of
'f, and evaluating the result. Simplified, you could also
>> do :f
Executed
{{
do [do [:f]]
}}
Here, 'f is encased in it's own block, and saved from 'do. But, outside
it's own local block, the f's value is evaluated.
>>do [do :f]
Executed
What do you think?
-Ted.
*********** REPLY SEPARATOR ***********
On 12/30/1999 at 11:31 AM [EMAIL PROTECTED] wrote:
OK, I don't know the advertisement, but as far as my knowledge of
english is
exploited, I would probably interpret it as a funny compliment.
What was I trying to underline was this:
f: func [] [print "Executed"]
(((:f)))
with any number of parentheses yields the same result. Another example:
do [do [:f]]
you can use any number of blocks here too...
But, consider this:
do head insert copy [] do [:f]
>> do head insert copy [] do [:f]
Executed
You get a different result, which looks slightly illogical to me.
Actually, to be precise, I have designed a different model of
evaluation,
that behaves exactly as Rebol evaluation in a normal case does, but is
free
of such (illogical?) effects. (To be exact: it is a model I thought
Rebol
used until I found the difference described above...)
Ladislav