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,bc2c82b1e5c6fe83 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.231 with SMTP id pv7mr5893896pbb.8.1330183999922; Sat, 25 Feb 2012 07:33:19 -0800 (PST) Path: h9ni7982pbe.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Question about out parameters of unconstrained array type. Date: Sat, 25 Feb 2012 16:33:08 +0100 Organization: cbb software GmbH Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: kuQH/mT1psJwQvBx6E6CEw.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: 2012-02-25T16:33:08+01:00 List-Id: On Sat, 25 Feb 2012 10:19:02 -0500, Peter C. Chapin wrote: > Consider a simple procedure > > procedure P(S : out String) is > begin > ... > end P; > > Despite the fact that S behaves as if it is uninitialized my Ada > compiler (GNAT GPL 2011) allows me to read certain attributes. Uninitialized /= not constructed > Is it well defined? Yes, because the actual of S has all attributes set. Compare it with this: declare S : String (1..20); -- S is uninitialized, but constructed begin if S'Length > 0 then -- This is OK > Where does it say so? I don't know, but there is common sense: Ada's design is sane enough not to allow existence of indefinite objects. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de