Re: IDL5 and large structures: Program code area full [message #10538 is a reply to message #10511] |
Wed, 17 December 1997 00:00   |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
Alex Schuster wrote:
> Wow, I get fast responses today!
>
> David Fanning helped me a lot when he wrote:
>
>> [reasonably long structure snipped]
>>
>>> Can anyone using IDL 5.02 be so kind check if this works?
>>
>> Well, it certainly works as you describe when it is "pasted"
>> onto the IDL command line, but why in the world would you
>> be doing this?
>
> This code is part of a script, which I invoke via @.
> The code I posted isn't the original code, I tried to make it more
> readable. In the original code, the variables (some_variable, str80
> etc.) are defined as system variables via DEFSYSV. I didn't like common
> blocks when I wrote the program, so I chose to use global system
> variables.
>
>>> And, no, I
>>> don't even think about modifying the program in any way.
>>
>> Well, I think I would modify it by adding an END statement
>> and at least running it as a main-level program. At least
>> then it will work. :-)
>>
>> IDL> .Run structure_def
>
> Good idea! I really should have tried this myself.
> After some changes (I define the structure in the program, and then,
> outside, the system variable) the code now compiles completely, and
> works.
>
An other way is to make a procedure from it e.g.
pro some,some_variable
some_variable = {_refima, $
disp : intarr (256, 256, 3), $
disp_3d : intarr (256, 256, 3), $
ident : 0, $
image_type : 0 }
end
The main program can compile it by resolve_routine and use execute in this
way.
pro main
resolve_routine,'some'
a=execute('some,some_variable')
help,some_variable,/str
end
I would prefer this solution because I don't like storing unused
variables or common blocks
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
|
|
|