comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Comparing version numbers
Date: Mon, 13 Nov 2017 21:25:00 +0100
Date: 2017-11-13T21:25:00+01:00	[thread overview]
Message-ID: <oucv2q$pd7$1@gioia.aioe.org> (raw)
In-Reply-To: oucppu$g21$1@gioia.aioe.org

On 2017-11-13 19:54, Victor Porton wrote:
> I don't understand you.
> 
> Dmitry A. Kazakov wrote:
>> On 2017-11-13 16:56, Victor Porton wrote:
>>
>>> But what is the difference between Compare_Textually and
>>> Compare_Lexicographically?
>>
>> Numerals in the text are ordered according to their values. E.g. if you
>> wanted to order files or versions by numbers in their names.
> 
> It is about Compare_Textually or about Compare_Lexicographically?
> 
>>> "This function compares two strings as texts." What does "compares as
>>> text" mean?
>>
>> Numerals in the text are equal. E.g. if you wanted filter out all
>> versions of the same package or all numbered files.
> 
> I don't understand.
> 
> Please elaborate. My Ada project is important, so your minute or two to
> elaborate is important.

Let you have files named as:

    A_1.2.txt
    B_30.txt
    A_100.0.txt
    A_40.1.txt
    B_2.txt

If you wanted to tell A_<n>.<m>.txt from B_<k>.txt that would be 
"textually". If you wanted to sort them in the "natural" order

    A_1.2.txt
    A_40.1.txt
    A_100.0.txt
    B_2.txt
    B_30.txt

that would be "lexicographically".

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2017-11-13 20:25 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
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 [this message]
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