[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: check for duplicate routine names?



>>>>> "MWA" == Michael W Asten <masten@mail.earth.monash.edu.au> writes:

MWA> It is a stupid error to have a two routines of the same name
MWA> DoitNow.pro , in two different library files MyLib1.pro and MyLib2.pro
MWA> .
MWA> But your correspondent is sometimes stupid.  The consequence of course
MWA> is that the second compilation (of MyLib2.pro ) over-rides the first (of
MWA> MyLib1.pro) , so  whatever was intended by maintenance of the code in
MWA> MyLib1.pro does not execute.  Or worse, when the two libs are compiled
MWA> in different sequences, results become unpredictable.

MWA> IDL does not appear to give any warning of the compilation of a routine
MWA> of same name as one already compiled.  Has anyone any ideas on how such
MWA> errors can be trapped ?

If you are using Emacs with IDLWAVE, it has tools to catch such
cases.  See the manual and a recent thread where JD explains how to
use it for detecting load-path shadows.

- Carsten

--
Carsten Dominik <dominik@astro.uva.nl>          \ _ /
Sterrenkundig Instituut "Anton Pannekoek"        |X|               _
Kruislaan 403; NL-1098 SJ Amsterdam             /| |\   _  _     _/ \
phone +31 (20) 525-7477; FAX +31 (20) 525-7484 __|o|___/ ~~ \___/    ~~~