From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a7135c0f450945a5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!m16g2000yqc.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: How to convert a string containing two hex digits to a character? Date: Sat, 9 Jan 2010 02:50:14 -0800 (PST) Organization: http://groups.google.com Message-ID: <93bb3b0f-1140-4fb7-8d7e-d97af3b57aaa@m16g2000yqc.googlegroups.com> References: NNTP-Posting-Host: 77.198.58.231 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1263034214 12635 127.0.0.1 (9 Jan 2010 10:50:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 9 Jan 2010 10:50:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m16g2000yqc.googlegroups.com; posting-host=77.198.58.231; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8680 Date: 2010-01-09T02:50:14-08:00 List-Id: On 6 jan, 23:19, Hibou57 (Yannick Duch=EAne) wrote: > On 6 jan, 22:54, Maciej Sobczak 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 =93 + =94 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 =93 + 1 =94 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".