Re: compile a routine wich inlude a commun [message #47064 is a reply to message #47062] |
Sun, 22 January 2006 13:37   |
Robert Barnett
Messages: 70 Registered: May 2004
|
Member |
|
|
I don't think that many of us use @ to have inline IDL code. @ has a
few limitations as you have shown. Why don't you just have a procedure
called create_common? The procedure should be compiled on the fly when
it is called at runtime. If it is not compiled on the fly, then you
should check that you have set up your IDL paths correctly. You can
also force recompilation using RESOLVE_ROUTINE.
*****************************
common_base.pro
pro common_base
common info_base, para1, para2, ect....
common info_head, head1, head2, ...
common info_point, point1, point2,...
end
*****************************
If you want to be really sneaky, you can use the structure autoload
feature to set up your common block. Admittedly, you might need a bit
more experience with IDL before trying this one at home.
*****************************
common_base__define.pro
pro common_base__define
common, common_base
common_base = {common_base, head1: 23, head2: 34}
....
end
*****************************
Robbie
|
|
|