Re: 8.0 name conflict [message #72080] |
Thu, 12 August 2010 08:07 |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Aug 12, 10:04 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Aug 12, 10:54 am, Jeremy Bailin <astroco...@gmail.com> wrote:
>
> Or you can set up a startup file that compiles it, as Mark mentioned
> above.
>
I will probably do both, keep legend.pro but warn users to compile it
in their startup, and also include a new file ial_legend.pro that
performs the same tasks.
> I had been for some time wondering if/when those main libraries that
> people use (IDLAstro included) are going to get their routine names
> changed to something unique, such as by adding a prefix.
IDL is often used for quick and dirty analyses, and for these cases a
function or variable that is easy to type has its virtues. (To reply
to an earlier comment from Bennett -- that is why I liked to use the
variable name 'list' for a set of integers.) So I will probably
modify library names on an "as needed" basis. --Wayne
|
|
|
Re: 8.0 name conflict [message #72084 is a reply to message #72080] |
Thu, 12 August 2010 07:04  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Aug 12, 10:54 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> Yikes, that's going to break lots of my code when I upgrade. :-( I
> suppose you'll rename the astronomy library procedure? I'm going to
> have a fun day of search-and-replace then...
Or you can set up a startup file that compiles it, as Mark mentioned
above.
I had been for some time wondering if/when those main libraries that
people use (IDLAstro included) are going to get their routine names
changed to something unique, such as by adding a prefix.
|
|
|
Re: 8.0 name conflict [message #72085 is a reply to message #72084] |
Thu, 12 August 2010 06:54  |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On Aug 11, 10:34 pm, wlandsman <wlands...@gmail.com> wrote:
> There is a popular procedure legend.pro in the IDL Astronomy library
> (http://idlastro.gsfc.nasa.gov/ftp/pro/plot/legend.pro) for putting
> a legend on a direct graphics plot. IDL 8.0 has a *function*
> LEGEND() for placing a legend on a PLOT(). While there is no
> conflict between a user procedure and an *intrinsic* function with the
> same name, in this case the ITTVIS function LEGEND() is written in
> IDL. So which ever gets compiled first prevents the other
> legend.pro from being compiled.
>
> If I put the standard IDL library at the beginning of the !PATH then I
> can't call the direct graphics LEGEND.
>
> IDL> legend
> % Compiled module: LEGEND.
> % Attempt to call undefined procedure/function: 'LEGEND'.
>
> But if I put the Astron Library ahead in the !PATH then I can't call
> LEGEND()
>
> IDL> l = legend(TARGET=[p1,p2], POSITION=[140,0.9], /DATA)
> % Compiled module: LEGEND.
> % Attempt to call undefined procedure/function: 'LEGEND'.
>
> --Wayne
Yikes, that's going to break lots of my code when I upgrade. :-( I
suppose you'll rename the astronomy library procedure? I'm going to
have a fun day of search-and-replace then...
-Jeremy.
|
|
|
Re: 8.0 name conflict [message #72087 is a reply to message #72085] |
Thu, 12 August 2010 06:47  |
Mark Piper
Messages: 198 Registered: December 2009
|
Senior Member |
|
|
On Aug 11, 8:34 pm, wlandsman <wlands...@gmail.com> wrote:
> There is a popular procedure legend.pro in the IDL Astronomy library
> (http://idlastro.gsfc.nasa.gov/ftp/pro/plot/legend.pro) for putting
> a legend on a direct graphics plot. IDL 8.0 has a *function*
> LEGEND() for placing a legend on a PLOT(). While there is no
> conflict between a user procedure and an *intrinsic* function with the
> same name, in this case the ITTVIS function LEGEND() is written in
> IDL. So which ever gets compiled first prevents the other
> legend.pro from being compiled.
>
> If I put the standard IDL library at the beginning of the !PATH then I
> can't call the direct graphics LEGEND.
>
> IDL> legend
> % Compiled module: LEGEND.
> % Attempt to call undefined procedure/function: 'LEGEND'.
>
> But if I put the Astron Library ahead in the !PATH then I can't call
> LEGEND()
>
> IDL> l = legend(TARGET=[p1,p2], POSITION=[140,0.9], /DATA)
> % Compiled module: LEGEND.
> % Attempt to call undefined procedure/function: 'LEGEND'.
>
> --Wayne
Hi Wayne,
I use the astrolib LEGEND a lot (but not as much recently since it's
my job to use IDL 8.0!) My workaround is to use the default !path
ordering and manually compile the astrolib LEGEND in my startup file
-- the function and procedure form of LEGEND can then comfortably
coexist in the IDL session.
mp
|
|
|