Re: something like perl's 'require 5.4' [message #24690 is a reply to message #24689] |
Tue, 17 April 2001 14:06   |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
Craig Markwardt <craigmnet@cow.physics.wisc.edu> writes:
> Vapuser <vapuser@catspaw.jpl.nasa.gov> writes:
>> How about:
>>
>> version=strupcase(strjoin(strsplit(!version.release,'[.-_]', /extract), ""))
>> input_version=strupcase(strjoin(strsplit(desired_release,'[. -_]',/extract), ""))
>> if version lt input_version then 'eeek'
>>
>> Clearly `desired_release' would have to be input as a string.
>>
>> Of couse, this method 'requires' IDL 5.3 (IIRC), to get the regular
>> expression semantics of strsplit. The other question is will RSI use
>> any separator in version designations besides these three?
> Umm, I never thought I'd be saying this, but aren't these a bit
> overengineered? I have found that in 95% of the cases the DOUBLE
> compare will work, and in 4% of the cases the STRING compare will
> work.
I've always found that a simple string comparison works in 100% of the cases.
Where doesn't it work?
Bill Thompson
|
|
|