comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: check for duplicate routine names?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: check for duplicate routine names? [message #23255 is a reply to message #23254] Fri, 19 January 2001 08:42 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
If I had a vote, I'd be strongly against such checking.
This means that any time I try to compile a routine which is already
compiled, I'd be stopped by a warning message?! That would be a disaster
for developing the code.
My take on it, avoid routines with generic names. It is tempting to
write a program called "Just_Doit.pro", but it pays to add
"prj1_just_doit.pro", unless you are writing a *library* function that
will be used universally by your other projects. In that case, there
better not be more than one version. I use these prefixes all the time,
and it gives some side benefits, too (less so now with Projects
available) - sorting by name in file manager puts all related files
together, etc.

Cheers,
Pavel

Michael W Asten wrote:
>
> 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and basic stable! widgets [Example program??]
Next Topic: Re: Printf and line breaks

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 21:16:09 PST 2025

Total time taken to generate the page: 0.08300 seconds