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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d5b211b0c1ffcf3e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.205.122.65 with SMTP id gf1mr2919684bkc.2.1339356795269; Sun, 10 Jun 2012 12:33:15 -0700 (PDT) Path: e27ni35957bkw.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Sun, 10 Jun 2012 21:33:14 +0200 Organization: cbb software GmbH Message-ID: <1c82b5mc3waww.1t6q6vj61u36u.dlg@40tude.net> References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> <8dcde661-2de0-454a-b126-cb930e8248d3@googlegroups.com> <1nlsyhn0wd5tg$.qyxyxucyis8s$.dlg@40tude.net> <8dcol2nvjzfc.p0bpy9m9od4o$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 4RFYTQ6jM/dAKFJoI0fUkg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2012-06-10T21:33:14+02:00 List-Id: On Sun, 10 Jun 2012 19:18:09 +0200, Yannick Duch�ne (Hibou57) wrote: > Please, why have you defined Code_Point as a modular type? > > http://www.dmitry-kazakov.de/ada/strings_edit.htm#7 > > Why > > type Code_Point is mod 2 ** 32; > > instead of > > type Code_Point is range 0 .. ((2 ** 32) - 1); Because code point is unsigned. When you declare something signed you do that because you want negative inverses. Signed integers have the base type with 0 in the middle of its range. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de