comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: How to convert a string containing two hex digits to a character?
Date: Mon, 11 Jan 2010 07:53:14 -0800 (PST)
Date: 2010-01-11T07:53:14-08:00	[thread overview]
Message-ID: <1eb0d4a1-8ad0-442a-b9aa-2b41a3f3a8db@d20g2000yqh.googlegroups.com> (raw)
In-Reply-To: 1a68twjk8xoel.16vicep9cbrn2.dlg@40tude.net

On Jan 9, 8:04 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> > 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.

I don't see this is a flaw.  It's a reminder that a Float, on any
computer, in any language, is actually limited to a subset of rational
numbers, which means you need to exercise some caution when using
them.  Programmers who think "Float" can represent any real number,
and that arithmetic on them is just like doing arithmetic on real
numbers, are going to get into trouble, so it doesn't seem like a good
thing to hide "the nature of Float as a model".

Anyway, Float'Succ was not present in Ada 83 but was added in Ada 95,
so someone must have thought it was useful for some practical purpose.

                               -- Adam



  reply	other threads:[~2010-01-11 15:53 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
2010-01-11 15:53                   ` Adam Beneschan [this message]
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