Re: Reference variables
Re: Reference variables
- Subject: Re: Reference variables
- From: Richard 23 <email@hidden>
- Date: Mon, 15 Jan 2001 21:39:49 -0800
>
> Could someone please clarify my understanding of the low-level workings
>
> of reference variables?
>
>
>
> 1) What exactly *is* a reference variable (as set by the 'a reference to'
>
> operator) physically? Is it a set of AppleScript tokens, some sort of
>
> superpointer, or what?
>
>
It acts like a pointer, but with greater functionality, since a reference can
>
point to a range ("words 2 thru 5" or "text from word 2 to word 5")Its like a
>
LISP closure, or a call-by-name parameter in ALGOL.
But it's not a pointer or a true reference since you can't pass a
reference
to a variable to a handler unless it's global in scope. Scope shouldn't
really matter, I would think, if it were a reference or pointer in the way
I understand those terms.
Scott mentioned this but it's significant enough to repeat.
R23