At 07:36 AM 11/24/99 -0600, you wrote:
>Interesting note: the parens around the second value (service) apparently
>are required to evaluate it, otherwise it tries to connect to the address
>"service"!  I know the 'rejoin evaluates it's parameters.
>Any other comments or clarifications would be great on why this is so.

If you evaluate source set-net, you will be able to view the set-net
implementation. It includes the following code:

    forall settings [
        if (item: first settings) = 'none [item: none]
        if word? item [item: form item]
        do first actions
        if tail? actions: next actions [break]
    ]

What happens is that item is assigned first settings, which is either
(service) with parens - correct, or service - fails.

The line if word? item [item: form item] is responsible for this behavior.
Once form item has been evaluated, what does item result in with or w/o
parens?

Lets take a closer look:

>> service: 'mail.host.com
== mail.host.com
>> settings: [service (service)]
== [service (service)]
>> item: first settings
== service
>> item: form item
== "service"
>> item: second settings
== (service)
>> item: form item
== "mail.host.com"


So the difference results from how 'form handles words with or w/o parens.
Apparently, when form finds the literal word 'service it simply embeds the
word in quotation  marks. In contrast form apparently dereferences a word
if that word is surrounded by parentheses.

Elan

Reply via email to