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

Home » Public Forums » archive » Writing programs to use static methods but still compile in IDL 7
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: Writing programs to use static methods but still compile in IDL 7 [message #91804 is a reply to message #91803] Sun, 30 August 2015 10:29 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Sun, 30 Aug 2015 09:05:40 -0700 (PDT), wlandsman wrote:

> I am trying to update my code to use the static methods introduced in IDL 8.4 when the user has V8.4 or later. So I write a statement like the following
>
> if !VERSION.RELEASE GE '8.4' then return,str.replace(in,out)
>
> This works in IDL 8.0 and later but in IDL 7.1.1 and earlier it gives a compilation syntax error.
>
>
> compile_opt idl2
> if !VERSION.RELEASE GE '8.4' then return,str.replace(in,out)
> % Syntax Error. Attempt to subscript array with parenthesis. Please use '[]'.
>
> Is there a way to have a program use the static methods when the user has IDL 8.4 or later without causing a compilation syntax error in IDL 7?
>
> An example program is
> http://idlastro.gsfc.nasa.gov/ftp/pro/misc/repstr.pro
>
> Thanks, --Wayne

Just an idea: Does
if !VERSION.RELEASE GE '8.4' then $
return,call_method('replace',a,in,out)
work? I don't have version 7 installed on my computer.

Cheers, Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: covariance matrix
Next Topic: Minor obscure error message

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

Current Time: Wed Oct 08 17:34:03 PDT 2025

Total time taken to generate the page: 0.00430 seconds