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
Writing programs to use static methods but still compile in IDL 7 [message #91803] Sun, 30 August 2015 09:05 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
[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 13:35:34 PDT 2025

Total time taken to generate the page: 0.00436 seconds