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.75.82 with SMTP id a18mr91367wiw.0.1366080991372; Mon, 15 Apr 2013 19:56:31 -0700 (PDT) Path: p18ni69668wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.146.MISMATCH!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.teledata-fn.de!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Mon, 8 Apr 2013 21:08:20 +0200 Organization: cbb software GmbH Message-ID: References: <1gnmajx2fdjju.1bo28xwmzt1nr.dlg@40tude.net> <3gv2jwc95otm.pl2aahsh9ox8.dlg@40tude.net> <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-08T21:08:20+02:00 List-Id: On Mon, 8 Apr 2013 17:35:17 +0200, Stefan.Lucks@uni-weimar.de wrote: > On Mon, 8 Apr 2013, Dmitry A. Kazakov wrote: > >>> Because even if the implementation of Ada.Text_IO.Open would know the >>> encoding of the filename, it could do nothing useful with it. >> >> ??? It must know the encoding in order to handle the file properly. > > Ah! Finally you seem to understand where the problem is! > > Ada.Text_IO would have to know the encoding, but it doesn't. See s-fileio.adb, lines 845-857. >>> Universal_Integer is a pseudo-type. >> >> With pseudo-values and pseudo-operations used by pseudo-programmers? (:-)) > > All objects of that type are constant. All operations are evaluated at > compile time. This is wrong. See 3.5.5(2) as an example of a non-static function returning Universal_Integer. That Universal_Integer leaks allows writing quite strange programs, e.g. ones using 'Pos attribute in order to perform run-time computations in universal arithmetic. Beware, that this is not portable, of course. Universal integer is constrained at run time. >> Universal types leak into >> run time through attributes. I.e. you do have objects of universal types at >> run time in expressions like >> >> Integer'Pos (X) * 2 > > You just used the already existing object 2 of type constant > Universal_Integer. Integer'Pos (X) * Integer'Pos (Y) > Even if you ignore the "constant", there is no > *definition* (or *declaration*) of an object O: Universal_Integer. Universal_Integer and other numeric types can be mixed in arithmetic and other operations. Period. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de