Number of local variables in MAIN [message #7655] |
Wed, 18 December 1996 00:00  |
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  |
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 #7729 is a reply to message #7655] |
Fri, 20 December 1996 00:00  |
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
-----------------------------------------------------------
|
|
|