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

Home » Public Forums » archive » Re: Workaround for "Program unit has too many local variables"?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Workaround for "Program unit has too many local variables"? [message #7285 is a reply to message #7283] Wed, 23 October 1996 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Charlie Zender wrote:
> IDL 3.6 will not compile a procedure that has grown rather large.
> the error message is:
> "Program unit has too many local variables"
> is there a workaround to this which does not involve rewriting
> the procedure? e.g., is there a system variable i can set to
> increase the # of local variables allowed?

You probably need to increase the memory used for compiling programs.
This is done with the .SIZE command, e.g.

.SIZE 60000 20000

which resizes the code and data areas to 60000 and 20000 bytes
respectively (the default is 32768 and 8192 bytes respectively). There
is an upper limit for the code and data size for each O/S. This will
help you out up to a point. If you have lots of arrays defined in your
program (like you would do with DATA statements in FORTRAN), then you
might not be able to increase the code and data areas to a large enough
size (the program will still fail to compile). In this case, you will
have to store your variables in data files, and read them on start-up. I
know this can be inconvenient, but it's just the way IDL works. The
other option is to break up your program into a number of smaller
procedures/functions, since every procedure/function has it's own
code/data space.

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: 2D FFt
Next Topic: Wanted: optical ray tracing

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

Current Time: Sun Oct 12 06:42:00 PDT 2025

Total time taken to generate the page: 2.64236 seconds