Re: What is -1
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>) |