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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Uninitialized out parameters. Date: Tue, 5 Apr 2016 18:19:46 +0200 Organization: A noiseless patient Spider Message-ID: References: <3be79ab3-ebc7-4169-9713-d50349662403@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 5 Apr 2016 16:16:29 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="11520"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JekeEGy2VVw3Tlh1go9UXmtGS6bjHkjA=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <3be79ab3-ebc7-4169-9713-d50349662403@googlegroups.com> Cancel-Lock: sha1:KKlYCskfgQLvPK4mxkYnGU9uX2Q= Xref: news.eternal-september.org comp.lang.ada:29997 Date: 2016-04-05T18:19:46+02:00 List-Id: On 05.04.16 14:02, ahlan@marriott.org wrote: > Ada.Text_IO.Put_Line ("V:" & V'img); > > The value zero is output, which because V is positive should be impossible. Addressing just this issue: the line is calling implementation defined attribute 'IMG, which can do as it pleases. The Ada type attribute 'Image takes a value of type Positive'Base, which includes 0, which is why outputting 0 is perfectly fine. (It's not a subtype attribute, but a type attribute, if this makes sense.)