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

Home » Public Forums » archive » Re: something like perl's 'require 5.4'
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: something like perl's 'require 5.4' [message #24701 is a reply to message #24700] Mon, 16 April 2001 16:57 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Vapuser <vapuser@catspaw.jpl.nasa.gov> writes:
> Hi all.
>
> I'm looking for something that check the version of the current IDL
> session against an input version, like perl's 'require 5.4'
> semantics and I *thought* I saw someone mention using something very
> much like this.
>
> Does anyone know of such a thing or was I just hallucinating?

Extending on JD's answer with two more possibilities:

if !version.release LT '5.4' then message, 'ERROR'
if double(!version.release) LT 5.4 then message, 'ERROR'

The first comparison is a string compare, while the second one is a
numeric compare. There is a slight difference, but in practice they
are identical, and they also both handle the case of 5.4.1, etc. The
former will handle 5.4.1a, but I think it's rare. I always use the
latter.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
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: OVERLAYING IMAGES
Next Topic: reading file into structure?

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

Current Time: Mon Dec 01 15:10:48 PST 2025

Total time taken to generate the page: 1.12401 seconds