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

Home » Public Forums » archive » Re: no backwards compatibility in IDL 5.6
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: no backwards compatibility in IDL 5.6 [message #34311 is a reply to message #34224] Fri, 28 February 2003 12:12 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
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?
> Pavel


Yes, without the execute statement, it will not compile in versions earlier
than 5.4. You get the error message

IDL> .run atan_complex_wrapper

(version GE 5.6): returnValue = ATAN(complexNum, /Phase)
^
% Keyword parameters not allowed in call.
At: /disk1/thompson/atan_complex_wrapper.pro, Line 12
% 1 Compilation errors in module ATAN_COMPLEX_WRAPPER.

However, only the last execute statement is actually required. The first two,
without the new keyword, can be direct statements.

Bill Thompson


> David Fanning wrote:
>>
>> FUNCTION ATAN_COMPLEX_WRAPPER, complexNum
>>
>> returnValue = 0.0
>> version = Float(!VERSION.Release)
>> CASE 1 OF
>> (version LE 5.4): ok = Execute('returnValue = ATAN(complexNum)')
>> (version EQ 5.5): BEGIN
>> realpart = Real_Part(complexNum)
>> imgpart = Imaginary(complexNum)
>> ok = Execute('returnValue = ATAN(realpart, imgpart)')
>> END
>> (version GE 5.6): ok = Execute('returnValue = ' + $
>> 'ATAN(complexNum, /Phase)')
>> ENDCASE
>> RETURN, returnValue
>> END
[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
Read Message
Previous Topic: Re: The continuing saga of WHERE and 2D
Next Topic: Re: labeling my polarplot

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

Current Time: Fri Oct 10 09:46:20 PDT 2025

Total time taken to generate the page: 2.16151 seconds