Unknown error [message #8046] |
Thu, 30 January 1997 00:00  |
Steven Thiel
Messages: 4 Registered: July 1996
|
Junior Member |
|
|
I have recently written a procedure that opens and closes several
files when run. Ocassionaly, I run accross the following error:
KW_MARK Too many levels deep
I have seen this before when running several procedures in one session
that require the opening and reading of files. Could someone please
tell me what this means and possibly how to keep it from happening?
|
|
|
Re: Unknown Error [message #14044 is a reply to message #8046] |
Mon, 18 January 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Bertrand Revenaz (breven@po-box.mcgill.ca) writes:
> I'm new to both PV-wave and IDL but I have to translate Wave files to
> idle. Nothing fancy just some graphing files to plot the results of a
> model. No interface or anything, it just makes the images. When I try to
> run the files under IDL I get the following message
>
> %prgram code area full
>
> I can't find any reference to it in any of the manuals. Can anybody help
> me...
You have in your hands a not-so-well-written IDL program. :-)
Basically, it is too big to be compiled in the space IDL sets
aside to compile programs. This should not be a problem in
IDL 5.x versions of IDL because the size will be set aside
dynamically, but you may have configure the amount of memory
set aside for this by hand in earlier versions of IDL. You
use the .Size executive command for this purpose.
IDL> .Size 50000 25000
The other alternative (and what I strongly recommend) is
to learn how to write more modular code. This will save
you hours and hours of time when it is necessary to
extend and maintain your programs.
My guess is this program you have is a gigantic main-level
program, when it could easily be 4-5 self-contained IDL
procedures or functions.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Note: This follow-up was e-mailed to the cited author.]
|
|
|
Re: Unknown Error [message #14046 is a reply to message #8046] |
Mon, 18 January 1999 00:00  |
L. Charles Burgwardt
Messages: 4 Registered: January 1999
|
Junior Member |
|
|
I've had procedures use up this "program space" also, but it seems to go
away if i just use the pro command and then compile.
Make the program a compiled procedure by putting "pro procedurename" at the
top, "end" at the bottom, and then compiling it and running it using
"procedurename" instead of "@filename".
Charlie B.
Bertrand Revenaz wrote:
> Hello,
>
> I'm new to both PV-wave and IDL but I have to translate Wave files to
> idle. Nothing fancy just some graphing files to plot the results of a
> model. No interface or anything, it just makes the images. When I try to
> run the files under IDL I get the following message
>
> %prgram code area full
>
> I can't find any reference to it in any of the manuals. Can anybody help
> me...
>
> Bertrand Revenaz
> breven@po-box.mcgill.ca
|
|
|