• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Removing items from lists (again!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/
}


  • Follow-Ups:
    • Re: Removing items from lists (again!)
      • From: Nigel Smith <email@hidden>
  • Prev by Date: Re: ESG MathLib 1.0
  • Next by Date: Re: Digest default subjects
  • Previous by thread: Re: Removing items from lists (again!)
  • Next by thread: Re: Removing items from lists (again!)
  • Index(es):
    • Date
    • Thread