[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LPeg 0.10
- From: Miles Bader <miles@...>
- Date: Wed, 10 Nov 2010 11:36:15 +0900
Nick Gammon <nick@gammon.com.au> writes:
>> * Changes from version 0.9 to 0.10
>
> If I may just point out, doing either a string or numeric comparison,
> version 0.10 is a lower version than 0.9.
>
> print ("0.10" > "0.9") --> false
> print (0.10 > 0.9) --> false
Nonetheless, it's a very standard format for version numbers.
When comparing version strings, you should compare runs of digits in
isolation, as numbers. Most package-handling programs should do that
automatically (and glibc even contains a variant of strcmp that does it
-- "strverscmp").
-Miles
--
Accord, n. Harmony.