In the interpreter:
>> qurl: "1234"
== "1234"
>> R: make object! [probe qurl qq: qurl probe qq]
"1234"
"1234"
== make object! [
qq: "1234"
]
This behaves like I'd expect. All "variables" or "words" are global by default.
Using a script:
REBOL []
qurl: "1234"
Q: make object! [
probe join "[Q before qq] qurl: " qurl
qq: qurl
probe join "[Q] qq: " qq
qurl: qurl
probe join "[Q after qurl] qurl: " qurl
]
probe join "[main before Q] qurl: " qurl
Q
probe join "[main after Q] qurl: " qurl
returns:
"[Q before qq] qurl: none"
"[Q] qq: none"
"[Q after qurl] qurl: none"
"[main before Q] qurl: 1234"
"[main after Q] qurl: 1234"
I'd expect that all probe
inside the Q
object!
would return "1234"
, but none does it.
Why is that?