[squeak-dev] Re: 1.0 not a valid VersionNumber?

Andreas Raab andreas.raab at gmx.de
Wed Apr 9 17:49:21 UTC 2008


Stephen Pair wrote:
>     Simplified example. The real version number I'm interested in looks
>     like "1.0.34". But it looks like VersionNumber is a no-go for me
>     anyway as you can't even compare, e.g., '1.1.1' asVersion <= '1.2.3'
>     asVersion. Does anyone actually use VersionNumber? I must be missing
>     the real use cases for it.
> 
> 
> I'm curious whether you'd expect this to return true or false (I'm guess 
> true).  The reason it refuses that compasion is that #< is meant to test 
> whether a given version number is an ancestor of another.  If you want 
> the stringish comparison behavior, you could just use string. 

I wish...

   '1.1.2' < '1.12.3'

=> false

Cheers,
   - Andreas



More information about the Squeak-dev mailing list