Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: (tye)Re2: Ordered Comparison of Generalized Version Strings.

by John M. Dlugosz (Monsignor)
on Jul 26, 2001 at 19:16 UTC ( [id://100010]=note: print w/replies, xml ) Need Help??


in reply to (tye)Re2: Ordered Comparison of Generalized Version Strings.
in thread Ordered Comparison of Generalized Version Strings.

I think yours does support differing number of digits in a part; e.g. 3.9 vs 3.10.

As for error checking, which is larger: 3.2 or 3B or i3r2 ?

  • Comment on Re: (tye)Re2: Ordered Comparison of Generalized Version Strings.

Replies are listed 'Best First'.
(tye)Re3: Ordered Comparison of Generalized Version Strings.
by tye (Sage) on Jul 26, 2001 at 19:49 UTC

    Yes, it supports comparing versions were 3.10 comes after 3.9 (because 3.9==3.09), but it doesn't support decimal numbers where 3.10 comes before 3.9 (because 3.9==3.90) [but if the decimal numbers that will be compared together always have the same number of digits after the decimal (as is often the case), then it works]. Obviously it can't support both version strings and all decimal numbers, I just mentioned that because it is a general-purpose "natural sort".

    Well, I definitely consider 3B to be a revision to the base branch and so 3B comes after 3.2. But I supposed some may disagree with me. So rejecting such comparisons is a worthwhile feature that can't be duplicated by a simpler method. (:

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100010]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found