MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Limit to length of lists?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34140] Limit to length of lists?
  • From: Bob Harris <nitlion at mindspring.com>
  • Date: Mon, 6 May 2002 05:20:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Howdy,

I'm running into a problem where it seems like you just aren't allowed to
assign a list of 40 thousand integers to a variable.

I've narrowed the failure down to the steps shown below.  Originally I was
trying to import a large list, but when that failed I started trying to see
just what worked and what didn't, and found that the problem has nothing to
do with importing.  The computation in the following will seem strange, but
it creates a list that similar to one that I couldn't import.  The
computation is probably not related to the problem either.

(1) In mathematica, I create a 40,000 entry list of numbers in the range
1..2^32/40000, and assign it to the variable tt.

(2) Then I change the list so that each entry is the sum of the previous
entries.  This results in a sorted list where the numbers range from about 1
to about 2^32.

(3) Then I display that list, and cut and paste the whole list into an
assignment to a variable named ss.  ss has not been previously used.  The
asignment doesn't generate any complaints from Mathematica.  The assingment
looks like this:
   ss = {44672, ... , 2142701433};
where the ... stands for 39,998 elements that I've left out of this mail
message.

(4) I then ask for Length[ss] and am told that it is zero.  This is
surprising, since the original list (which was created using Mathematica
functions rather than just a big assignment) had the desired length (i.e.
Length[tt] is 40000.

(5) Attempts to index into ss also fail.  For example, ss[[1]] gives me the
messages
    Part::partd:
     Part specification ss[[1]] is longer than depth of object.

(6) After quitting and relaunching Mathematica, I've tried doing steps 3, 4,
and 5 by themselves.  The failure is the same.

Anyone have any idea what's goin on here?  And how I can correct it?  I've
wandered so far away from what I was originally trying to do, I'm starting
to get pretty frustrated.  Is there some artificial limit imposed on the
length of lists?  Is there some way I can control it?

I'm using Mathematica 4.0.1.0 on a G3 Mac running OS 9.0.4.  I've got it set
up to provide 20 MB for Mathematica and 30 MB for MathKernel.

Thanks for any help,
Bob H



  • Prev by Date: Re: Problems with SIMPLIFY and SOLVE
  • Next by Date: ContourIntegral in Mathematica 4.1
  • Previous by thread: Re: Help for Mathematica
  • Next by thread: Re: Limit to length of lists?