Re: How do you check the equivalency of references?
Re: How do you check the equivalency of references?
- Subject: Re: How do you check the equivalency of references?
- From: John W Baxter <email@hidden>
- Date: Fri, 10 Aug 2001 15:49:48 -0700
At 17:52 -0400 8/10/2001, Arthur J Knapp wrote:
>
> Subject: Re: How do you check the equivalency of references?
>
> Date: Fri, 10 Aug 2001 14:29:38 +0100
>
> From: Nigel Garvey <email@hidden>
>
>
> on isRef(val)
>
> try
>
> contents of val
>
> return (result is not val)
>
> on error
>
> return false
>
> end try
>
> end isRef
>
>
There is another way to determine references:
>
>
count of references in {v} = 1
>
>
Richard 23 once pointed out to me a very good reason why the
>
"contents of" method is better, though I can't recall what it was.
>
Perhaps it has something to do with
set v to a reference to 5
(count of references in {v}) = 1
--> false
It was only an accident that I noticed...5 seemed a handy thing to type at
the moment.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA