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

Home » Public Forums » archive » Re: Unsupported keyword on older IDL version
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: Unsupported keyword on older IDL version [message #31633 is a reply to message #31632] Mon, 29 July 2002 19:41 Go to previous messageGo to previous message
Paul Hick is currently offline  Paul Hick
Messages: 9
Registered: November 1999
Junior Member
Craig Markwardt wrote:

> Paul Hick <pphick@ucsd.edu> writes:
>
>
>> This kind of problem must have come up in this group before, but here it
>> is anyways.
>>
>> If I call the IDL systime function with the utc keyword:
>> print, systime(/utc)
>>
>> on IDL versions older than 5.4 I get the expected 'keyword not
>> supported' error message, since, well, it's not supported, right? The
>> error message pops up when the function containing the systime call is
>> compiled, so testing e.g. !version.release before executing the systime
>> call doesn't work.
>>
>> The only solution I have come up with so far is to put the systime call
>> inside a call_function call:
>> print, call_function( 'systime', /utc)
>> This will compile (I will still need to test for !version.release before
>> actually executing the statement of course).
>>
>
> Another possibility is to use the _EXTRA mechanism:
>
> ;; Assume EXTRA is undefined
> if double(!version.release) GE 5.4 then $
> extra = {utc: 1}
> value = systime(_EXTRA=extra)
>
> Anyway you cut it, you will need an IDL version check.
>
> Craig
>
>

The _extra mechanism is a fairly recent addition to IDL, isn't it? So
that would just move the problem to a different arena.

The systime function is 'special' in the sense that it is a 'built-in'
IDL function (there is no systime.pro file floating around anywhere that
I can see). That suggests another solution. The systime(/utc) call could
be hidden in a separate user-written function systime_for_idl5_4.
Calling this after checking !version.release would also work, since the
user-written routine would never get compiled on pre5.4 versions.

Paul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: how to input idl figure to MS office
Next Topic: CALL_EXTERNAL

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

Current Time: Wed Oct 08 17:44:18 PDT 2025

Total time taken to generate the page: 0.00414 seconds