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

Home » Public Forums » archive » 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 #34307 is a reply to message #34266] Fri, 28 February 2003 12:35 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 28 Feb 2003 13:12:17 -0700, William Thompson wrote:

> 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.
>

Aha! Another conspiracy laid to rest. IDL apparently checks whether
zero, or more than zero keywords are allowed.

Try compiling:

pro foo
empty,/FOO
end

and you'll see what I mean. Since ATAN went from having zero to more
than zero keywords, this explains it. The compile vs. runtime
handling of keywords (perverse as it is) has remained unchanged.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: 2 questions about .sav files
Next Topic: Re: writing ascii files (with really long lines...)

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

Current Time: Sat Oct 11 23:06:57 PDT 2025

Total time taken to generate the page: 1.20151 seconds