Re: Counting the items in anested list
Re: Counting the items in anested list
- Subject: Re: Counting the items in anested list
- From: Emmanuel <email@hidden>
- Date: Wed, 23 May 2001 12:02:59 +0200
At 7:57 +0200 22/05/01, garbanzito wrote:
>
thanks! i had glanced at commands and operators applicable
>
to lists in the language guide, hadn't thought to think of
>
"rest" as a property. it doesn't work on empty lists
>
though. and "properties of {1, 2, 3}" returns an empty
>
record. curious.
If you're not sure about the properties of lists, and you use Smile, you
can choose "Find definition" for "list", and get AppleScript's section
about it:
----------------------------
Class list : An ordered collection of items
Plural form:
lists
Properties:
length integer [r/o] -- the length of a list
reverse list [r/o] -- the items of the list in reverse order
rest list [r/o] -- all items of the list excluding first
----------------------------
Emmanuel