• 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: What is -1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is -1


  • Subject: Re: What is -1
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 25 Feb 2001 12:25:47 -0800

On 2/25/01 11:59 AM, "Brad Giesbrecht" <email@hidden> wrote:

> Hello list,
>
> Simple question. I see this type of thing all
> the time.
>
> <snip>
> set this_text to characters --optionreturn
> (x + 1) thru -1 of this_text as string
> <snip>
>
> Is -1 the last item of a list or string?
>
Precisely so. And -2 is the second-to-last, etc. It's extremely useful,
rather than having to to count all the items every time.

--
Paul Berkowitz


References: 
 >What is -1 (From: Brad Giesbrecht <email@hidden>)

  • Prev by Date: What is -1
  • Next by Date: Re: 2^1024
  • Previous by thread: What is -1
  • Next by thread: WARNING: AppleScript Trojan Horse[was: Trojan atack: help me please]
  • Index(es):
    • Date
    • Thread