Re: Forgotten but not gone
Re: Forgotten but not gone
- Subject: Re: Forgotten but not gone
- From: Charles Arthur <email@hidden>
- Date: Sat, 27 Jan 2001 15:59:52 +0000
Cal <email@hidden> wrote (re my comments on vectors and lists)
>
>>set x to [1, 2, 3]
>
>>set y to [4, 5, 6]
>
>>set z to x & y
>
>>set item 2 of y to 999
>
> >z --> {1, 2, 3, 4, 999, 6}
..
>
>set a to {1, 2}
>
>set b to [3, 4]
>
>set c to a & b
>
>set second item of b to 99
>
>c --> {1, 2, 3, 4}
>
>
>
>So curly brackets rule over vectors... fascinating...
>
>
Sorry to disappoint, Charles, but nothing weird here. It's not that
>
curly brackets rule...it's that square brackets represent an old
>
implementation of lists, superceded in AppleScript 1.1 by a newer
>
implementation. In the last example, concatenating a and b must
>
necessarily make a new copy of the contents of b, because you
>
couldn't have a single list, part as a vector and part as a linked
>
list. Make sense?
Absolutely. It's just fascinating to know that there's this implementation
which still works 0.3.3 versions later. (I'm still on 9.0.4 and AS1.4.3.)
Not that I've found many uses for lists, even in this way, but then again I
haven't spent that much time trying to automate a ton of stuff. You can see
how this could be useful if a and b were inputs, varying, and c was an
output.
Charles
PS to be boring, it's superSede - from the Latin super (over/above) and the
verb sedere, to sit. To sit above. The Supreme Court in the US supersedes
all others.
http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...