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 17:04:51 +0100
Date: 2010-01-09T17:04:49+01:00	[thread overview]
Message-ID: <1a68twjk8xoel.16vicep9cbrn2.dlg@40tude.net> (raw)
In-Reply-To: e675a8cf-fc27-4987-ac9c-23e50e828bd9@m3g2000yqf.googlegroups.com

On Sat, 9 Jan 2010 06:50:17 -0800 (PST), Hibou57 (Yannick Duchêne) wrote:

> On 9 jan, 12:33, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:
>> 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.
> Nice to read you
> 
> Not “ No ”, while True as well. Right that it is not the only way to
> define it.
> 
> You may define the attraction as the opposite of the repulsion, or you
> may define the repulsion as the opposite of the attraction.

Huh, not in intuitionism. The law of excluded middle is not an axiom, even
in physics. Take diffuse reflection instead of repulsion as *an* opposite
to attraction.

> In some
> area, you may define Pred and Succ based on “ + ” and “ - ”, or in an
> as good way, define + and - based on Pred and Succ.

I would rather say Succ *consistent* with +, IFF both exist.

> There are no Pred and Succ on reals, complexes and the likes,

BTW, there is Float'Succ! I tempted to say due to a language design flaw,
because it exposes the nature of Float as a model.

There is a big difference between real and complex numbers. The former have
the relation >. Real'Succ does not exist because the set {t|t>x} is open,
therefore there is no Min{t|t>x}, only Inf{t|t>x} = x. Complex numbers do
not even have >.

> but
> their “ + ” and “ - ” are not either the same too (homonym, but
> different things), and that's because their “ + ” and “ - ” are not
> the same that they do not have a Pred and Succ.

There exists a subset of Complex isomorphic to Real. In mathematics that
subset is indistinguishable from Real. In a typed system of Ada they are
different not because of their properties, but nominally due to their
attribution to different types. Moreover even type X is new Float is not
Float in Ada.

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



  reply	other threads:[~2010-01-09 16:04 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
2010-01-09 14:50               ` Hibou57 (Yannick Duchêne)
2010-01-09 16:04                 ` Dmitry A. Kazakov [this message]
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