Re: Forgotten but not gone
Re: Forgotten but not gone
- Subject: Re: Forgotten but not gone
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 26 Jan 2001 15:17:16 -0800
On 1/26/01 10:31 AM, "Richard 23" <email@hidden> wrote:
>
So, from the annals of scripting yesteryear, I bring back from
>
the nearly dead... the original linked list.
>
>
A list is a list, right? Nope. A list is a vector, at least
>
the lists we're accustomed to using ever since AppleScript 1.1.
Actually, we had a discussion about vectors and linked lists a little over a
year ago, richard, before you started contributing here.
I discovered that if I wrote
tell application "Outlook Express"
set ls to (every contact whose last name starts with "B")
if contact "Paul Berkowitz" is in ls then "yes"
end tell
instead of:
tell application "Outlook Express"
set ls to (every contact whose last name starts with "B")
if {contact "Paul Berkowitz"} is in ls then "yes"
end tell
I got an error: "Can't make contact id 119 into a vector."
Someone found "vector" in the AppleScript non-Dictionary, but no
documentation to explain what it was. Bill Cheeseman eventually came up with
some documentation on vectors and linked lists from the era you refer to,
and Cal then filled in a few gaps.
If you use Smile to read the AppleScript non-Dictionary, you can find both
vector and linked list there. It's very useful having the linked list keep
an "active" link as records do (although I often forget about it). I vaguely
remember some mention of operations on vectors (our regular lists) being
faster than on linked lists.
--
Paul Berkowitz