comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How to convert a string containing two hex digits to a character?
Date: Sat, 9 Jan 2010 12:33:32 +0100
Date: 2010-01-09T12:33:28+01:00	[thread overview]
Message-ID: <2m4g35mnk59z$.xhxh0f7riqad.dlg@40tude.net> (raw)
In-Reply-To: 74e3d1de-b560-442d-8190-f3285ee31b0c@f5g2000yqh.googlegroups.com

On Sat, 9 Jan 2010 03:13:38 -0800 (PST), Hibou57 (Yannick Duch�ne) wrote:

> I'm welcome to close my comments with more wordings, the addition and
> substraction have a formal logic definition which is based on the
> notion of successor and predecessor, so the most pure and native way
> of doing "+1" and "-1" is to use the successor and predecessor
> function. Ada knows that, yeah ;p (as its 'Pred and 'Succ are more
> universal than its standard "+ and "-" operators)

No. Addition is an operation (in an Abelian group) that may exist
independently on the order relation. As an example consider the complex
numbers, which is a field. As such it has addition and subtraction.
Nevertheless it lacks order, and thus there is no Complex'Pred or
Complex'Succ. And conversely, there can be an order, but no addition.
Example: String.

The guide line should be the semantics. If it is an iteration intended,
then T'Succ is a clear favorite, just because x + 1 has nothing to do with
enumeration. Unfortunately T'Succ is much too verbose, because it
unnecessarily refers to the type.

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



  reply	other threads:[~2010-01-09 11:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  0:39 How to convert a string containing two hex digits to a character? Leslie
2010-01-06  0:43 ` Leslie
2010-01-06  1:22   ` Hibou57 (Yannick Duchêne)
2010-01-06  1:31     ` Hibou57 (Yannick Duchêne)
2010-01-06  2:05       ` Leslie
2010-01-06  2:39     ` Leslie
2010-01-06  2:42       ` Leslie
2010-01-06 21:54     ` Maciej Sobczak
2010-01-06 22:19       ` Hibou57 (Yannick Duchêne)
2010-01-09 10:50         ` Hibou57 (Yannick Duchêne)
2010-01-09 11:13           ` Hibou57 (Yannick Duchêne)
2010-01-09 11:33             ` Dmitry A. Kazakov [this message]
2010-01-09 14:50               ` Hibou57 (Yannick Duchêne)
2010-01-09 16:04                 ` Dmitry A. Kazakov
2010-01-11 15:53                   ` Adam Beneschan
2010-01-11 18:13                     ` Dmitry A. Kazakov
2010-01-15 19:59                     ` Hibou57 (Yannick Duchêne)
2010-01-15 22:06                       ` John B. Matthews
2010-01-06  5:17 ` tmoran
2010-01-06 22:19   ` Leslie
2010-01-06 22:22   ` Hibou57 (Yannick Duchêne)
2010-01-07 14:26 ` John B. Matthews
replies disabled

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