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

Home » Public Forums » archive » Re: rstrpos: version 5.2 and version 5.3
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: rstrpos: version 5.2 and version 5.3 [message #19095 is a reply to message #19088] Thu, 24 February 2000 00:00 Go to previous messageGo to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
David Fanning wrote:
>
> J.D. Smith (jdsmith@astro.cornell.edu) writes:
>
>> It's there.
>>
>> You just need to add lib/obsolete under rsi/idl to your IDL search path, or,
>> equivalently, search all sub-paths of lib. I do this as a matter of course, to
>> ensure such things don't happen.
>
> Yes, or alternatively (this is what I decided to do recently),
> include the code in the source that uses it. I did this because
> I *know* people don't have the OBSOLETE directory on their
> path and I get tired of finding 10 e-mails in the morning
> asking why my programs don't work. :-(
>
> I resorted to this after first trying something like this:
>
> IF Float(!Version.Release) GT 5.2 THEN BEGIN
> dot = StrPos(line, ".", /Reverse_Search)
> ENDIF ELSE BEGIN
> dot = RStrPos(line, ".")
> ENDELSE
>
> Although that *seemed* like a good idea at the time,
> I found that the line won't compile in versions of
> IDL older than IDL 5.3. :-(
>

IDL objects to the mentioning of a function it can't find. Simply use
call_function and it can't complain (how can it object to a string?).

IF Float(!Version.Release) GT 5.2 THEN $
dot=call_function("StrPos",line,".",/Reverse_Search) $
ELSE $
dot=call_function("RStrPos",line, ".")

JD

--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
[Message index]
 
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: quoted null character
Next Topic: Frame Grabber

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

Current Time: Sun Oct 12 11:31:06 PDT 2025

Total time taken to generate the page: 1.60969 seconds