Re: no backwards compatibility in IDL 5.6 [message #34313 is a reply to message #34224] |
Fri, 28 February 2003 11:42   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Pavel Romashkin (pavel_romashkin@hotmail.com) writes:
> Why is EXECUTE used in this program? Why can't the value just be
> returned from each CASE? Execute will slow it down and as far as I can
> tell, does nothing special. There is no code that follows the CASE to
> prevent you from returning at any point. Will it not compile in 5.4 with
> the extra keyword? I thought keyword mismatches are runtime errors. Am I
> missing something?
Alright, here is why I am using EXECUTE. If I change the code
to this:
returnValue = 0.0
version = Float(!VERSION.Release)
IF (version LE 5.5) THEN returnValue = ATAN(imgpart, realpart) $
ELSE returnValue = ATAN(complexNum, /Phase)
Then the code won't compile in IDL 5.4, complaining about
the PHASE keyword not being defined. :-(
Unless I've completely misunderstood (probable with the
drugs I'm taking for this cold), keywords should be
sorted out at run-time, not at compile time, according
to your theory. What then to you make of this?
Cheers,
David
P.S. The code *does* compile in IDL 5.5, by the way,
even though the PHASE keyword is not defined there, either.
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|