arrays vs. functions conflicts [message #38394] |
Fri, 05 March 2004 03:28  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
Dear IDL experts,
since I was lucky enough to learn IDL after the []-brackets
revolution, the potential conflicts between arrays() and function()
calls never bothered me until I found out about it... then the
nightmares really started. ;-)
Thus my problem:
To resolve the conflict {that is, limits.pro being already
compiled and procedure.pro refusing to compile because it has
an old-fashioned statement like var=limits(1:2) instead of
var=limits[1:2]} I'm thinking of automatically compiling
the (hopefully) few troubling routines like procedure.pro
at startup using the resolve_routine() statement.
(BTW, why is the IDL compiler (5.5) not smart enough to
understand that function(1:2) is an array? ":" is never allowed
in function calls, after all.)
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).
Greetings,
Paolo
DISCLAIMER: any IDL code, variable names and procedure statements
cited in this message are purely fictional and any resemblance to
real code, variable names and procedure statements, living or dead,
is coincidental.
____________________________________________________________ ________
Paolo Grigis
ETHZ - Institute of Astronomy email: pgrigis@astro.phys.ethz.ch
Scheuchzerstrasse 7
ETH Zentrum phone: ++41 1 632 42 20
8092 Zurich fax : ++41 1 632 12 05
Switzerland http://www.astro.phys.ethz.ch/
____________________________________________________________ ________
|
|
|