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

Home » Public Forums » archive » Re: Checking version number
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: Checking version number [message #66831 is a reply to message #66828] Fri, 12 June 2009 14:52 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Kenneth P. Bowman" <k-bowman@null.edu> wrote in message
news:k-bowman-2E3784.16284012062009@news.tamu.edu...
> I don't like to write version-dependent code, but with the improved PS
> driver in IDL 7.1 I would like to keep my old workarounds for 24-bit
> color available.
>
> The quantity stored in !VERSION is a string
>
> IDL> help, !version.release
> <Expression> STRING = '7.1'
>
> But this is not simple to convert to a number, because there are
> instances like this
>
> IDL> help, !version.release
> <Expression> STRING = '6.4.1'
>
> Is there an easy way to test whether the version is greater than or equal
> to 7.1?
>
> Ken Bowman

how bout just parsing the field, and multiplying it by an increasing
number of powers of ten.

6.4.1 becomes 600 +40 + 1

7.1 becomes 700 +10 + 0

7.1.1.1.1.1.1.1.1.1.1.1 becomes 700 +10 + 1 + 0.1 + 0.01 ...etc
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 4 byte integers
Next Topic: Re: Confusions with map_image!

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

Current Time: Mon Dec 01 22:11:16 PST 2025

Total time taken to generate the page: 0.80129 seconds