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

Home » Public Forums » archive » Number of local variables in MAIN
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
Number of local variables in MAIN [message #7655] Wed, 18 December 1996 00:00 Go to next message
Dean Schulze is currently offline  Dean Schulze
Messages: 9
Registered: July 1996
Junior Member
I got the message

'Program unit has too many local variables'

while running a series of scripts. 'help' shows 251 local
variables. The program level is MAIN.

Is there some way to increase the number of local variables?
I'm running IDL v3.6 on HP-UX 9.05.

Thanks.


Dean Schulze

============================================================ ==========
"You plot the growth of the NEA [National Education Association] and
the dropping of SAT scores, and they're inversely proportional.
The problems are unions in the schools. The problem is bureaucracy.
I'm one of these people who believes the best thing we could ever do
is go to the full voucher system."

Steve Jobs
Wired Magazine, Feb. 96
http://www.hotwired.com/wired/4.02/features/jobs.html
============================================================ =========
Re: Number of local variables in MAIN [message #7723 is a reply to message #7655] Mon, 23 December 1996 00:00 Go to previous message
Dean Schulze is currently offline  Dean Schulze
Messages: 9
Registered: July 1996
Junior Member
David Fanning wrote:

> There is no way to increase the number of local variables allowed.

An RSI tech. support representative told me that the limit on the
number of local variables would be removed (or maybe greatly
increased) with version 5.0 of IDL. But for now there is no way
to increase that number.


> There are *lots* of ways to decrease the number of local variables
> in your programs, starting with making your programs more modular.
> This has the wonderful side-effect of making you a *much* better
> IDL programmer automatically. :-)
>
> If it were me, I'd try to run fewer "scripts" and more "programs".

I use scripts because it gives me access to all of the variables
used which makes debugging easier and lets me study intermediate
calcualtions as well as results. For my current project it is
the plotting scripts that are generating excess variables and they
can be turned into .pro modules.

Thanks.

Dean Schulze

============================================================ ==========
"You plot the growth of the NEA [National Education Association] and
the dropping of SAT scores, and they're inversely proportional.
The problems are unions in the schools. The problem is bureaucracy.
I'm one of these people who believes the best thing we could ever do
is go to the full voucher system."

Steve Jobs
Wired Magazine, Feb. 96
http://www.hotwired.com/wired/4.02/features/jobs.html
============================================================ =========
Re: Number of local variables in MAIN [message #7726 is a reply to message #7655] Sun, 22 December 1996 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
I got this problem sometimes ago again.

The solution was to use structures instead of single variables.


R.Bauer
Re: Number of local variables in MAIN [message #7729 is a reply to message #7655] Fri, 20 December 1996 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Dean Schulze <schulze@cassini.lpl.arizona.edu> writes:

> I got the message
>
> 'Program unit has too many local variables'
>
> while running a series of scripts. 'help' shows 251 local
> variables. The program level is MAIN.
>
> Is there some way to increase the number of local variables?
> I'm running IDL v3.6 on HP-UX 9.05.

There is no way to increase the number of local variables allowed.

There are *lots* of ways to decrease the number of local variables
in your programs, starting with making your programs more modular.
This has the wonderful side-effect of making you a *much* better
IDL programmer automatically. :-)

If it were me, I'd try to run fewer "scripts" and more "programs".

Happy Holidays,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Programming Update
Next Topic: IDL FAQ

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

Current Time: Fri Oct 10 07:59:11 PDT 2025

Total time taken to generate the page: 0.54913 seconds