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 #21306 is a reply to message #21233] Wed, 16 August 2000 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
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

Thanks, Craig.

I didn't believe that this would cure it (I had thought it would just
change the
error message), but you are right, it works. So, maybe some people can
still live
with IDL 5.2 after all.

BTW: any one out there who is still using earlier versions (prior to
5.2)?
Maybe I shouldn't ask because I fear this will swamp the newsgroup -- so
please
reply only by email, subject "old idl", content '!version = ' then I
will
collect these messages for a while and report a summary later (after a
week
or two). I assure you that these messages will be kept strictly
confidental and
will be deleted after processing the version information.

Cheers,
Martin




--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[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 18:21:21 PST 2025

Total time taken to generate the page: 0.40284 seconds