• 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: limit on length of lists returned (was Re: Sifting a list sans loop)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: limit on length of lists returned (was Re: Sifting a list sans loop)


  • Subject: Re: limit on length of lists returned (was Re: Sifting a list sans loop)
  • From: Paul Skinner <email@hidden>
  • Date: Tue, 29 Jan 2002 08:55:46 -0500

On Tuesday, January 29, 2002, at 04:02 AM, Helmut Fuchs wrote:

At 2:30 Uhr -0600 29.01.2002, ehsan saffari wrote:
got it's text
set myTxt to myData's Text --> 5313 items

Actually you didn't get a list here, you got a string!

Try:
set a to "0123456789"
repeat with i from 1 to 10
set a to a & a
end repeat
characters of a
--
--> error "Stack overflow..."

But this works:
characters of (text 1 thru 4072 of a)

So the actual limit (at least for this case) seems to lie with 4072 items.

HTH,

Strangely, I get varying results when testing the limits of returned list length.

set tex to ""
set t to "0123456789"
repeat 4072 times
set tex to tex & t
end repeat

set l to items 1 thru 4070 of tex
display dialog (count l)
-->4070

try
set l to items 1 thru 4071 of tex
display dialog (count l)
on error err
display dialog err
end try
-->Stack Overflow

try
set l to items 1 thru 4072 of tex
display dialog (count l)
on error err
display dialog err
end try
-->Stack Overflow

set AppleScript's text item delimiters to "5"
set l to every text item of tex
display dialog (count l)
-->4073

Even stranger, I got lists reliably returned that were 4071 items long when writing this (4074 with TIDs-break method ), then suddenly the max dropped by one! Whatever mechanism is breaking has several weaknesses.

10.1 AS 1.8.1 PB Bronze 400
--
Paul Skinner


References: 
 >limit on length of lists returned (was Re: Sifting a list sans loop) (From: Helmut Fuchs <email@hidden>)

  • Prev by Date: Re: Problems with speed & issues with coercion in OS 9.2.2 (App
  • Next by Date: Re: Sifting a list sans loop
  • Previous by thread: limit on length of lists returned (was Re: Sifting a list sans loop)
  • Next by thread: automatic scripts
  • Index(es):
    • Date
    • Thread