[REBOL] Re: Evaluator of expressions with 'where clause
From: rotenca:telvia:it at: 22-Oct-2002 13:53
Hi Jan Skibinski
> What is a difference between 'any and 'any-type?
> I noticed that the help utility sometimes responds
> with the former and sometimes with the latter.
> Is there any special meaning in it, or is this
> a matter of an accidental ora historical nature?
> Does it have anything to do with a differentiation
> between the native! and the function!?
> Or explicit/implicit unknown argument types?
When a function is without explicit type, it is visualized by Help with 'any
(it is only an help feature, cannot be used as specification for a function
argument).
'Any-type! means: any argument, also unset! argument, no argument, error!
argument.
x2: func [a [any-type!]][value? 'a]
x2 ;== false
x2 print "" ;== false
x2 make error! "" ;== true
'Any means: one argument, not unset! and error!.
x: func [a][value? 'a]
x; ** Script Error: x is missing its a argument ** Near: x
x print "" ;** Script Error: x is missing its a argument ** Near: x print ""
x make error! "" ;** User Error: ** Near: x make error! ""
---
Ciao
Romano