comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Comparing version numbers
Date: Mon, 13 Nov 2017 06:15:49 +0100
Date: 2017-11-13T06:15:49+01:00	[thread overview]
Message-ID: <oub9q1$rqr$1@dont-email.me> (raw)
In-Reply-To: <oub0kd$1a6r$1@gioia.aioe.org>

Le 13/11/2017 à 03:39, Victor Porton a écrit :
> Suppose I have two version numbers of a software. I need to check which of 
> the two is greater.
> 
> Lexical order string comparison does not work:
> 
> "2.3" vs "11.4".
> 
Add '0's to the part before the '.' so that they have the same length:
"02.3" vs "11.4".


-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


  reply	other threads:[~2017-11-13  5:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13  2:39 Comparing version numbers Victor Porton
2017-11-13  5:15 ` J-P. Rosen [this message]
2017-11-13  8:04   ` briot.emmanuel
2017-11-13 11:11     ` Simon Wright
2017-11-13 21:30       ` briot.emmanuel
2017-11-13  8:10 ` Dmitry A. Kazakov
2017-11-13 15:56   ` Victor Porton
2017-11-13 17:22     ` Dmitry A. Kazakov
2017-11-13 18:54       ` Victor Porton
2017-11-13 20:25         ` Dmitry A. Kazakov
2017-11-16 15:33 ` Robert Eachus
2017-11-17 14:45 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox