Re: Counting the items in anested list
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