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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4876056933faf283 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!news.astraweb.com!border5.a.newsrouter.astraweb.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!195.14.215.230.MISMATCH!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 26 Aug 2009 11:23:43 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Spark_IO: improving with postconditions? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a94ff1d$0$31876$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 26 Aug 2009 11:23:41 CEST NNTP-Posting-Host: 5230530c.newsspool3.arcor-online.net X-Trace: DXC=IoWkNIdfBTM^B]`=U:WelBMcF=Q^Z^V3H4Fo<]lROoRA^YC2XCjHcbI32LghY[]J1E;9OJDO8_SKFNSZ1n^B98iJ5da6dVi`AgG X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7983 Date: 2009-08-26T11:23:41+02:00 List-Id: Maciej Sobczak schrieb: > procedure Get_Line (File : in File_Type; > Item : out String; > Stop : out Natural); > --# global in out Inputs; > --# derives Inputs, > --# Item, > --# Stop from Inputs, File; > --# declare delay; > > Wouldn't it be good to enhance this specification with additional: > > --# post Stop <= Item'Last; Will Spark accept this String? X : String (-1 .. -2); If so, another precodition might be needed, Item'Last in Natural; If Get_Line (or for that matter, a program) can do useful things with empty string buffers. Is it desirable?