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

Home » Public Forums » archive » IDL as programming language?
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: IDL as programming language? [message #2897 is a reply to message #2735] Thu, 01 September 1994 09:43 Go to previous message
wally is currently offline  wally
Messages: 3
Registered: February 1994
Junior Member
The comments that IDL is a quick and dirty language aren't totally fair. IDL
is a very powerful language that is easy to use, but that doesn't mean that code
written in IDL is necessarily dirty. It has the constructs that allow you to
write clear well structured programs if you take the time. If you're not willing
to invest the time in good software development practices then you will get
confusing unmaintainable software, but that's true in Fortran or C also. I've
seen plenty of examples of spaghetti code written in Fortran. However, I will say
that there is one feature of IDL that is easily abused and tends to create dirty
code. IDL is not a strongly typed language like PASCAL. Not only don't
you have to define variables, IDL is perfectly happy to dynamically redefine
variables in the middle of a program changing an array to a scalar. For example
you could have

a = fltarr(10,10)

but later if you have

a = 1

you won't get an error; a is redefined to be a scalar integer. So even if you
define all your variables at the front of a program you're not guaranteed
those definitions are valid. On the other hand this feature is one of the
aspects of IDL that makes it so easy to use.

In addition IDL is funny in how it creates variables on the fly.
If you have

a = fltarr(10)
b = a

that's ok. On the other had if you have

c(0:4) = a(0:4)

then you get an error that c is undefined


--
------------------------------------------------------------ -------------------
Wally Gross phone : 301-286-6690
Code 971 Bldg. 22 Room 335 e-mail : wally@halfhalt.gsfc.nasa.gov
Goddard Space Flight Center
Greenbelt, MD 20771
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: request: PV-WAVE routine to plot graphs with error bars in BOTH X & Y
Next Topic: Rect 2 Polar Conversion

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

Current Time: Fri Oct 10 08:11:07 PDT 2025

Total time taken to generate the page: 0.80443 seconds