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 #23246 is a reply to message #23242] Fri, 19 January 2001 10:54 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> writes:

> Craig Markwardt wrote:
>> Another thing that would be nice is warnings about ambiguous uses of
>> variables that might shadow a function in the library. Note this
>> code:
>>
>> max = max(x, min=min)
>>
>> The next time you use min(x), will you get the function or the
>> variable named min?
>>
... deleted by Craig
>
> I believe a function takes precedence over an identically named array
> subscripted with parentheses, e.g.
>
> IDL> min = indgen(10)
> IDL> a = indgen(5)
> IDL> print, min(a)
> 0
>
> Using square brackets eliminates the ambiguity between the function name
> and the variable name:
...

Point taken. I was more trying to say, "because these things can
*potentially* be confusing, it would be nice to have a tool that
checks for them." My example of MIN/MAX was a little trivial; there
are possible clashes with, say, the Astronomy library which are not as
obvious.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Sat Oct 11 08:42:05 PDT 2025

Total time taken to generate the page: 0.64597 seconds