[REBOL] Re: local vars in functions
From: rotenca:telvia:it at: 1-May-2002 3:45
Hi,
Rethinking at my previous message, i must change one thing. At the start of
the block context, the first (set)word is a strange word which i don't
understand well. Could it be a bug?
This is OK:
foo: 0 foo2: 1
>> make object! [get 'foo2 foo: 2 foo2: 3]
** Script Error: foo2 has no value
** Near: get 'foo2 foo: 2 foo2:
But not this :
>> make object! [get 'foo foo: 2 foo2: 3]
why not the error?
This is OK:
>> make object! [print type? get/any 'foo2 foo: 2 foo2: 3]
unset
But not this:
>> make object! [print type? get/any 'foo foo: 2 foo2: 3]
** Script Error: type? expected value argument of type: any-type
** Near: print type? get/any 'foo foo:
What happens? What type of word is it? Seems an unbound word, but it does not
give the standard error message of an unbound word (if i am not wrong,
Ladislav's undefined? func returns true for 'foo but the error catched by the
func is not the standard "not defined in this context")
---
Ciao
Romano