[REBOL] Global function defined in context
From: reboler::ifrance::com at: 26-Dec-2002 19:50
Hi, List
Until recently I thought that the two following constructions were equivalent.
1.
myWorld: context [
set 'helloWorld func [][print "Hello World"]
]
2.
myWorld2: context [
helloWorld2: func [][print "Hello second World"]
]
In fact, it is not. From (1.) we get a global function, from (2.) a local function.
>> helloWorld2
** Script Error: helloWorld2 has no value
** Where: do-boot
** Near: helloWorld2
>> myWorld2/helloWorld2
Hello second World
Does 'set always create global function?
if so, wouldn't it be better if documented in "HELP SET"?
Patrick
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms