Re: Declaration of variables in IDL [message #26889 is a reply to message #26888] |
Wed, 03 October 2001 06:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Hans de Boer (boer@kfih.azr.nl) writes:
> I have been working with IDL for quite a while now, but never
> encountered a way of fixing variable types in IDL. Especially when
> adding new variables to old pieces of code, it can be very confusing if
> a variable of that name was already in use. IDL simply changes the
> variable type (including changes of array dimension) if required and
> possible. If not possible, you are the lucky one to get run-time errors,
> but if possible, the code seems to run quite nicely and the poor
> programmer is left with apparently correct results.
> I also have found that people new to IDL have generated extremely sneaky
> bugs this way.
> Does anybody know of making IDL performing an explicit variable check
> during compilation ?
I think you need to switch to Pascal. :-)
IDL, as a weakly-typed language, is inherently
messy. That's the downside. The upside is that
it is also powerful for this very reason. No
question you can get into trouble if you are
not careful, but this applies to love as well
as software, and we find a way to make do.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|