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

check for duplicate routine names?



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

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

I suggest that at least in an IDL Project, the command "Compile all
routines"  should include such checking as a debugging tool.  Or am I
merely shifting blame for my stupidity onto the compiler?  (you know how
it is when you bang your head the second time, on the same kitchen
cupboard door?).

Regards,
Michael Asten