[REBOL] Re: bind
From: ryanc:iesco-dms at: 18-Oct-2001 12:30
Bind just tells rebol where to look for the definitions of words
in a block when they evaluated by the interpreter.
examples:
>> words: to-block {copy "test"}
== [copy "test"]
>> do words ; the words are not bound to any meanings!
** Script Error: copy is not defined in this context
** Where: do-boot
** Near: copy "test"
>> do bind words in system/words 'self
== "test"
>> do words ; bind is persistent too.
== "test"
>> words: to-block {copy "test"}
== [copy "test"]
>> meanings: context [copy: :alert] ; context is the same as
make object!
>> bind words in meanings 'self
== [copy "test"]
>> do words ; shows an alert box saying "test".
== true
>> ; Same as...
>> meanings/copy "test"
== true
>>
Graham Chiu wrote:
> Would someone be able to explain in english what 'bind does.
> I've read the explanation in the Rebol word browser and am
> no clearer than before :(
>
> --
> Graham Chiu
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400