The Rebol/Core Dictionary states that return "Returns a value from a
function."  But the following example shows this is not true:

>> z: func [][switch "i" ["z" [print "Z"] "i" [print "Here" return "Hello"]]
return "Goodbye"]
>> z
Here
== "Goodbye"

It appears as though return returns from a block scope, not a function
scope. Examination of the Users guide did not provide any additional clues,
nor did the online FAQ (except the fact that all of the examples in the
Users guide had a return at the function scope.)

Any ideas?
David Logan

Reply via email to