Hi Stefan,
Good question. Just a quick comment, others may wish to expound further.
Paths like functions are "hot", the interpreter tries to fully evaluate them
when encountered. In your case the path evaluates to an . The interpreter
then automatically tries to evaluate the word foobar, resulting in the
error. You can prevent the full evaulation like this:
>> type? :path1
== path!
or
>> type? get/any 'path1
== path!
HTH
-Larry
----- Original Message -----
From: Falk Stefan, ITS-SL <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 7:44 AM
Subject: [REBOL] Path and contexts etc.
> Hi list!
> How come it behaves like this?
>
> >> string1: "foobar"
> == "foobar"
> >> type? string1
> == string!
> >> to-path string1
> == foobar
> >> path1: to-path string1
> == foobar
> >> type? path1
> ** Script Error: foobar is not defined in this context.
> ** Where: type? path1
>
> /Regards Stefan
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.