• 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: Counting the items in anested list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Counting the items in anested list


  • Subject: Re: Counting the items in anested list
  • From: Jed Verity <email@hidden>
  • Date: Tue, 15 May 2001 11:46:51 -0700

If you know the number of "subItems" and this is a constant for all records,
you could do something like this:

--begin script
set x to {{"a", "b"}, {{"c", "d"}, {"e", "f"}}}
set subItemCount to count items of item 1 of x
set x to x as string
set finalItemCount to (count items of characters of x) / itemCount
-->3.0
--end script

On 5/15/01 10:48 AM, you wanted me to know this:

> say there is a nested list and we count it's items:
>
> set x to {{"a", "b"}, {{"c", "d"}, {"e", "f"}}}
> set cnt to count of items in x --> 2
>
> is it possible to count the items in x (=3) without a repeat loop?
>
> hope that's clear
>
> thanks
> ehsan
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


~)~)~)~)~)~)~)~)~)~)~)~)~)
Jed Verity


  • Prev by Date: Searchable archives...
  • Next by Date: Re: Counting the items in a nested list
  • Previous by thread: Counting the items in anested list
  • Next by thread: Re: Counting the items in anested list
  • Index(es):
    • Date
    • Thread