comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL 5.2 array definition question.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL 5.2 array definition question. [message #21428] Mon, 28 August 2000 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Paul van Delst <pvandelst@ncep.noaa.gov> writes:
> The documentation (that I read before posting the original message)
> actually specifies this except the number that they guarenteed across
> versions was only 25!. My (badly formed) question can be rephrased as:
>
> why?
>
> Like I alluded to previously, IDL 5.3 raised the limit to 65536 (or
> thereabouts) which is way larger than any array initialisation anyone
> would want to type by hand, but I would still like to know what design
> decisions the pre-5.3 behaviour was based on. That's all.

My guess is that this is a limitation of the IDL parser, the part of
IDL that converts tokenized text into the compiled form.

Most modern parsers today are written with assistence from programs
like lex and yacc. These parsers *can* have problems handling large
lists of items, but not if they are written properly. In principle
they can handle lists of unbounded size.

I would further guess that the IDL parser is more home-brew than
yacc-descended, and as such has some hardwired limits for things like
array size. They probably just bumped up those limits for IDL v5.3.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: IDL 5.2 array definition question. [message #21430 is a reply to message #21428] Mon, 28 August 2000 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
David Fanning wrote:
>
> Paul van Delst (pvandelst@ncep.noaa.gov) writes:
>
>> Like I alluded to previously, IDL 5.3 raised the limit to 65536 (or
>> thereabouts) which is way larger than any array initialisation anyone
>> would want to type by hand, but I would still like to know what design
>> decisions the pre-5.3 behaviour was based on. That's all.
>
> Memory limitations on a PDP-11 computer. :-)

I remember using one of those to do my fortran assignments on back in
'83. Was I glad when they updated to a DEC-20!

I believe a well know poster to this newsgroup (who shall remain
un-named) used to have to boot one of those PDP-11's with 8" floppies
and cassettes, flicking switches and blinking lights, to process lidar
data. Man. Couldn't boot that thing a couple of years after I got there
as we used the boot discs for late afternoon "duck-or-die" sessions.
Getting hit by a frisbee-ing 8" floppy (with the case on) shure hurts.
Yow.

paulv

--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
Re: IDL 5.2 array definition question. [message #21434 is a reply to message #21428] Mon, 28 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Paul van Delst (pvandelst@ncep.noaa.gov) writes:

> Like I alluded to previously, IDL 5.3 raised the limit to 65536 (or
> thereabouts) which is way larger than any array initialisation anyone
> would want to type by hand, but I would still like to know what design
> decisions the pre-5.3 behaviour was based on. That's all.

Memory limitations on a PDP-11 computer. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDL 5.2 array definition question. [message #21435 is a reply to message #21428] Mon, 28 August 2000 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Craig Markwardt wrote:
>
> Paul van Delst <pvandelst@ncep.noaa.gov> writes:
>
>> Hi,
>>
>> I'm sure this is a another hoary old chestnut of a question but here
>> goes....
>>
>> I have an IDL routine that returns the atomic weight of a requested
>> element - defined by symbol, name, or atomic number. I check the
>> validity of all these. Can somebody tell me why - in IDL 5.2 - my array
>> containing the valid symbol names has to be defined like:
> ...
>
> Short answer: the IDL parser had a limit on the number of array
> elements that could be specified explicitly. The number was 129 I
> believe. It may be that this restriction was relaxed in IDL 5.3.

The documentation (that I read before posting the original message)
actually specifies this except the number that they guarenteed across
versions was only 25!. My (badly formed) question can be rephrased as:

why?

Like I alluded to previously, IDL 5.3 raised the limit to 65536 (or
thereabouts) which is way larger than any array initialisation anyone
would want to type by hand, but I would still like to know what design
decisions the pre-5.3 behaviour was based on. That's all.

paulv

--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
Re: IDL 5.2 array definition question. [message #21447 is a reply to message #21428] Sat, 26 August 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Paul van Delst <pvandelst@ncep.noaa.gov> writes:

> Hi,
>
> I'm sure this is a another hoary old chestnut of a question but here
> goes....
>
> I have an IDL routine that returns the atomic weight of a requested
> element - defined by symbol, name, or atomic number. I check the
> validity of all these. Can somebody tell me why - in IDL 5.2 - my array
> containing the valid symbol names has to be defined like:
...

Short answer: the IDL parser had a limit on the number of array
elements that could be specified explicitly. The number was 129 I
believe. It may be that this restriction was relaxed in IDL 5.3.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Sum along diagonals
Next Topic: Re: Origin of IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 06:45:08 PDT 2025

Total time taken to generate the page: 2.07792 seconds