How does BIND work?
BIND takes a block of words and BINDs them into the current context. It takes a word from the context you want to BIND to as its second argument. Try playing with this example: REBOL [ Title: “BIND Demo” ] global: on x: 1 y: 2 z: 3 local-context: func [/local context][ use [x y z ] [set [x y z] [a b c] print bind [x y z] ‘context] ] global-context: func [][ use [x y z] [set [x y z] [a b c] print bind [x y z] ‘global] ] local-context global-context halt LOCAL-CONTEXT prints a b c GLOBAL-CONTEXT prints 1 2 3 LOCAL-CONTEXT’S BIND is actually redundant. GLOBAL-CONTEXT’s BIND uses the word ‘global to cause the values of X Y and Z be set to their values where the word ‘global is defined, which happens to be out in the global context. You may also BIND to other contexts besides the global context.
Related Questions
- Is it possible to bind several EYE-02 cameras together, place a SIM card in one of them only and use others as wireless remote video detectors?
- Why isn the bind date/time/job visible for some members even with DFSMS/MVS 1.3 or later data management software?
- What can I use instead of egg to bind Veggie Fritters?