Re: arrays vs. functions conflicts [message #38378] |
Fri, 05 March 2004 07:47  |
Wayne Landsman
Messages: 117 Registered: January 1997
|
Senior Member |
|
|
> But before going on, I just wanted to know if there is an
> easier way ouy of this that I have overlooked (and no, I
> definitely do not want to override useful programs written
> by others with my own []-version, only to start all over
> again each time a new version or bug fix of the routine
> comes out).
You might try the program idlv4_to_v5.pro in
http://idlastro.gsfc.nasa.gov/ftp/contrib/landsman/v5/
which does an automatic replacement of () subscripts with [] using
ROUTINE_INFO() to check whether a variable is an array or a function.
It works about 99% of the time though occasionally gets confused by
multiple lines or execute statements. You can then add a
compile_opt idl2 to ensure that IDL knows the difference.
You might then give the [] version to the developers of the routines and
tell them that "nobody is using V4.0 or earlier anymore...."
--Wayne
|
|
|