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.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a568c3c1e0be03bf X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.143.145 with SMTP id v17mr391699bku.7.1339692153310; Thu, 14 Jun 2012 09:42:33 -0700 (PDT) Path: e27ni47924bkw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Streams and abnormality Date: Tue, 12 Jun 2012 11:06:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <9cd8589d-e8c1-402e-822e-d57aac39948e@googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1339524530 9469 127.0.0.1 (12 Jun 2012 18:08:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 12 Jun 2012 18:08:50 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-12T11:06:48-07:00 List-Id: On Tuesday, June 12, 2012 10:32:00 AM UTC-7, Simon Wright wrote: =20 > Looking at the AI[2], I must say I don't see quite where the > "discriminants or if the component_declaration has a default_expression" > comes from.=20 Well, the wording was there in the first version of Ada 95 (AI95-195 didn't= change it). !summary 7 has to do with discriminants that don't match when= 'Read is called, the discriminants have default expressions (otherwise the= y're not read from the stream), and the actual parameter is constrained. I= t doesn't address the issue of invalid representations. In RM12, the wording will be changed to "for each scalar component that is = a discriminant or that has an implicit initial value". But I think this in= dicates that the wording was deliberate. I don't know why it was important= to specify this for components with default expressions (or implicit initi= al values), and the Ada 95 Rationale doesn't say. Anyway, your thinking th= at maybe they meant that it applies only to discriminants with default expr= essions, doesn't make sense; it has to apply to all discriminants, because = the discriminant could be used to control a variant part, and reading a dis= criminant with an invalid value is going to wreak havoc regardless of wheth= er it has a default expression. -- Adam > It looks to me as though this should have read > "discriminants whose component_declaration has a default_expression" > (see !summary 7).