[REBOL] Re: "get" function
From: pwawood::gmail at: 9-Nov-2010 11:52
On 9 Nov 2010, at 10:54, Duke Normandin wrote:
> =46rom "REBOL/Core Users Guide - Chapter 4 - Expressions":
>
> [quote]
> print native? :if
> true
>
> Here the get returns the function for if.
> [/quote]
>
> Is this a typo? I don't see the "get" function being used. Is it
> implied in native?
No, it's not a typo. The "get" function (or an equivalent) was used. No, it's not implied
in native?
What you wrote was equivalent to:
>> print native? get 'if
true
The : prefix denotes a get-word value, that is to say :if is a get-word. In REBOL a get-word
evaluates to the "contents" of the word. (I quoted contents
because depending on the type of value, the result of the evaluation may be the value
referred to in the word - as is the case with functions).
The section on Words in the REBOL/Core 2.3 docs is still valid - http://www.rebol.com/docs/core23/rebolcore-4.html#section-5
Regards
Peter
=20=