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

Home » Public Forums » archive » Re: Declaration of variables in IDL
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: Declaration of variables in IDL [message #26888 is a reply to message #26885] Wed, 03 October 2001 07:28 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Hans de Boer wrote:
>
> Hi there,
>
> 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 dunno about IDL, but my immediate solution (after checking in all the code to be altered into
a version control system) would be to sit the prospective programmers in front of the code with
a pad and a pencil and disable all but the editor-arrow keys and editor-search functions (to
poll the namespace for variables names) and give them a day or two to think about what they
need to do, how they would go about doing it (more than one method would be a good thing), and
what are the consequences of each method. This initial sit down and think about it period will
save a lot more time later because the code won't fall in the messy heap that usually results
with the tinker-and-recompile method of change/debugging.

I have had people change some of my code and then later (after they forgot what they did)
complain that my code doesn't work and is broken (and sometimes, whimper...sniff, they're not
that polite). Needless to say a couple of wasted hours later the code works again - usually by
me doing a "rm -fr *" (== delete absolutely everything for you windows/mac fellers) followed by
a "cvs checkout".

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
[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
Previous Topic: Re: Is there a line widget
Next Topic: global singleton object ?

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

Current Time: Wed Oct 08 18:39:31 PDT 2025

Total time taken to generate the page: 0.00452 seconds