Re: Removing items from lists (again!)
Re: Removing items from lists (again!)
- Subject: Re: Removing items from lists (again!)
- From: "Arthur J Knapp" <email@hidden>
- Date: Fri, 23 Feb 2001 10:11:02 -0500
>
Date: Thu, 22 Feb 2001 18:47:53 +0000
>
From: Nigel Smith <email@hidden>
>
Subject: Removing items from lists (again!)
>
But it seems as though AS is quite happy trying to get item 0 of a list
>
(though it sensibly fails trying to get the (length + 1) item) -- at least
>
on my system/AS version.
From Bill Cheeseman's report on AppleScript 1.5:
In AppleScript 1.4.3 and earlier, attempting to access item 0 of a list
(e.g. 'item 0 of {2, 3, 4}') would produce no error and no result. In
AppleScript 1.5 and later, it produces an 'index out of range' error."
This has prevented people from using tricky constructs such as "items 1
thru 0" of a list. However, a construct like "items 1 thru -2 of {1, 2,
3}" still correctly generates a result of "{1, 2}".
--
{
Arthur J Knapp, of STELLARViSIONs ;
http://www.STELLARViSIONs.com ;
mailto:email@hidden ;
http://developer.apple.com/techpubs/
macos8/InterproCom/AppleScriptScripters/
AppleScriptLangGuide/
}