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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.106.161 with SMTP id gv1mr1360749wib.4.1365924814767; Sun, 14 Apr 2013 00:33:34 -0700 (PDT) Path: p18ni60971wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!plix.pl!newsfeed2.plix.pl!217.153.128.51.MISMATCH!nf1.ipartners.pl!ipartners.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 9 Apr 2013 18:15:11 +0200 Organization: cbb software GmbH Message-ID: <1cbd0w75c5wzk$.8vco21sptex4.dlg@40tude.net> References: <1gkxiwepaxvtt$.u3ly33rbwthf.dlg@40tude.net> <1fmcdkj58brky.bjedt0pr39cd$.dlg@40tude.net> <1bj564vat3q1j$.1s4d00rlzx4ux$.dlg@40tude.net> <4hzv51v872q2$.1imijbwd7heqm$.dlg@40tude.net> <1htu9idmcci7x.1vr9eafeivqah$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: rHWOzyHApalsT5sEUcbvVQ.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="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-04-09T18:15:11+02:00 List-Id: On Tue, 9 Apr 2013 17:20:35 +0200, Stefan.Lucks@uni-weimar.de wrote: > On Tue, 9 Apr 2013, Dmitry A. Kazakov wrote: > >> You cannot do >> >> X : String; >> >> either. String is a pseudo-type? > > This is a straw man argument. String is not pseudo. Universal_Integer is neither. >>> Again, my understanding is that they are converted before any run-time >>> operation is performed. >> >> Wrong but irrelevant as well, because semantically there is no difference. > > OK, so look at the semantic. Different semantic means the same operation > with the same inputs behave differently. > > The following program fragment nicely prints "Smaller or Equal": > > if ((Character'Pos('z') ** Character'Pos('z')) > > (Character'Pos('z') ** Character'Pos('z'))) > then > Put_Line("Larger"); > else > Put_Line("Smaller or Equal"); > end if; > > This is really cool -- the sematic of Universal_Integer enables us to > perform operations over huge integers without overflows. It does not, the range of Universal_Integer at run-time is implementation-dependent. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de