comp.lang.ada
 help / color / mirror / Atom feed
From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: How to convert a string containing two hex digits to a character?
Date: Sat, 9 Jan 2010 02:50:14 -0800 (PST)
Date: 2010-01-09T02:50:14-08:00	[thread overview]
Message-ID: <93bb3b0f-1140-4fb7-8d7e-d97af3b57aaa@m16g2000yqc.googlegroups.com> (raw)
In-Reply-To: fcf80f53-941e-4f5b-a602-7aac413ef57d@35g2000yqa.googlegroups.com

On 6 jan, 23:19, Hibou57 (Yannick Duchêne) <yannick_duch...@yahoo.fr>
wrote:
> On 6 jan, 22:54, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
>
> > Sorry, but I find it to be overly paranoid.
> > What has happened to the old good "Something + 1"?
>
> No such thing as paranoia here, as any way, for numbers, X + 1 and
> Number_Type'Succ (X) are strictly equivalent (thus, the Succ function
> attribute is not more paranoid than the “ + ” operator).
>
> As the question was from a student, I was just trying to give him/her
> some food for dinner. It's always good to know about Succ : it is
> required with enumerated types, and it is the only way to do something
> like “ + 1 ” when a numeric type is passed as a formal discrete type
> parameter of a generic.

Number_Type'Pred and Number_Type'Succ are also useful when just
increment are decrement are to be done on type whose standard
operators are not visible. It allows to do this computation without
even requiring a "use type".



  reply	other threads:[~2010-01-09 10:50 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) [this message]
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
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