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

Home » Public Forums » archive » Re: IDL 8.0 compile_opt changes
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 8.0 compile_opt changes [message #69184 is a reply to message #69183] Fri, 18 December 2009 18:26 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Dec 18, 4:51 pm, Chris Torrence <gorth...@gmail.com> wrote:

>
> 1. Change the default to be "compile_opt idl2", add a new "compile_opt
> idl1" to restore the existing behavior, and require users to retrofit
> existing code.
>
I strongly support this option.

ITTVIS (then RSI) introduced square brackets with V5.0 in 1997. At
the time, I wrote a procedure

http://idlastro.gsfc.nasa.gov/ftp/contrib/landsman/v5/idlv4_ to_v5.pro

to automatically convert procedures using round parentheses for
indexing to use square brackets instead. idlv4_toV5 isn't perfect
-- it can get confused by parentheses within strings or matching
parentheses not on the same line -- but it took care of 95% of the
work, and I was able to convert the entire Astrolib.

From that time, whenever I've modified an astrolib procedure, I also
added a compile_opt idl2 at the beginning. The idea was that while I
was a testing a procedure for a new modification, I could also test if
making the default integer type long introduced any problems. And
there was one case where making the change did introduce some subtle
problems. This was for some homemade low-level database software
in which one parsed a byte stream. What happened was that "a = 0 &
readu,1,a" was now reading 4 bytes instead of 2. But this was the
only case of a problem, and I haven't had another problem in the past
eight years. I would think that 12 years of recommending compile_opt
idl2 is enough for people to adjust.

I should also add as an old (in more than one sense of the word)
programmer, I was never really comfortable with IDL objects until I
started learning some Python. Seeing the dot notation made me
realize that an object is just an IDL structure with functions
included ;-) So I agree that adding the dot notation to IDL should
certainly help new users. --Wayne
[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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Contributions
Next Topic: Re: how to read/display an image like it's done in ENVI?

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

Current Time: Thu Oct 09 15:24:00 PDT 2025

Total time taken to generate the page: 1.83826 seconds