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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad06d2d7cb045687 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.189.72 with SMTP id gg8mr16885336pbc.4.1328104155623; Wed, 01 Feb 2012 05:49:15 -0800 (PST) Path: lh20ni248605pbb.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!gegeweb.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: =?utf-8?B?U2lsbHkgYW5kIHN0dXBpZCBwb3N04oCRY29uZGl0aW9uIG9yIG5vdMKgPw==?= Date: Wed, 01 Feb 2012 14:49:14 +0100 Organization: Ada @ Home Message-ID: References: <12kegkefstjiy.115bw2vmx23ll.dlg@40tude.net> <4f27b5e8$0$6628$9b4e6d93@newsspool2.arcor-online.net> <19jyp0vyqkcop$.6oatj9p6pcp1$.dlg@40tude.net> <4f27dfa5$0$6570$9b4e6d93@newsspool4.arcor-online.net> <12pod8zxdo56v.16pnewlc853au$.dlg@40tude.net> <4f280a00$0$6583$9b4e6d93@newsspool3.arcor-online.net> <4f284488$0$6634$9b4e6d93@newsspool2.arcor-online.net> <1wn5azarpihb1.13g4tvu7fddve.dlg@40tude.net> NNTP-Posting-Host: hOKO0RFtGK7OFijb2trtpQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-01T14:49:14+01:00 List-Id: Le Wed, 01 Feb 2012 11:37:31 +0100, a = =C3=A9crit: > Back to the original poster's question: > >>> function Parsed (S : String) return Parsed_Type >>> with Post =3D> >>> (if S'Length not in Image_Length_Type then >>> Parsed'Result.Status =3D Format_Error); >>> -- There may be other failure conditions. > > What is special about that specific failure condition that singles it = out > from all other failure conditions? Hard and tedious (very tedious) to define in the language of expressions= = in a postcondition, but still handily defined in a human language or oth= er = dedicated formal notations. The failure condition expressed here, is = simply an easy and obvious one. That's also a useful one, because if the= = client don't know how much to read, based on this postcondition, it know= ns = that going above Image_Length_Type'Last is of no use. This is important = = for defining constraints for buffers and strings receiving inputs. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity