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

Home » Public Forums » archive » David: for your book ?
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: David: for your book ? [message #21312 is a reply to message #21233] Wed, 16 August 2000 00:00 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Craig Markwardt wrote:
>
> Martin Schultz <martin.schultz@dkrz.de> writes:
>> As an aside, I recently found another problem in terms of backward
>> compability (I am
>> sure something similar was already mentioned in this newsgroup, but this
>> was the first
>> time I had this problem):
>> I tried to write a routine that takes advantage of the new StrMatch
>> and StRegex
>> functions in 5.3. In order to ensure backward compatibility, I enclosed
>> these function calls
>> with
>> IF !Version.Release GE 5.3 THEN BEGIN
>> ENDIF
>>
>> However, a colleague tells me: no chance! The program will report a
>> syntax error when run in
>> IDL 5.2! So, the problem is that IDL looks for a function of this name
>> during compile stage
>> and doesn't care if it will ever be used.
> ...
>
> There is a way to do this without defining an external function, by
> using FORWARD_FUNCTION properly:
>
> FORWARD_FUNCTION stregex, strmatch
> IF !Version.Release GE 5.3 THEN BEGIN
> foo = stregex(bar)
> sm = strmatch(eg)
> ENDIF
>
> This will make sure that IDL will always recognize strmatch & stregex
> as functions during the compilation stage, and there will be no syntax
> errors in any IDL version. It is harmless in IDL 5.3. If you really
> want the warning message, then by all means go ahead and make your own
> strmatch definitions et al.
>
> Have fun,
> Craig
>
> --

Don't write it yourself

Take the strmatch routine from the deutsch library
http://www.astro.washington.edu/deutsch/idl/htmlhelp/slibrar y24.html


Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Passing function to function called by qromb etc.?
Next Topic: Passing function to function called by qromb etc.?

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

Current Time: Tue Dec 02 19:32:44 PST 2025

Total time taken to generate the page: 0.00224 seconds