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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-04 05:52:00 PST Sender: georg@sonnenregen.at.home Newsgroups: comp.lang.ada Subject: Re: += in ada References: From: Georg Bauhaus Date: 04 Oct 2003 14:51:33 +0200 Message-ID: <86vfr5np2i.fsf@sonnenregen.at.home> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 82.82.120.90 X-Trace: 4 Oct 2003 14:51:36 +0200, 82.82.120.90 X-Complaints-To: abuse@arcor-ip.de Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.news.nacamar.de!news.belwue.de!newsfeed.arcor-online.net!newsfeed.arcor-ip.de!news.arcor-ip.de!82.82.120.90 Xref: archiver1.google.com comp.lang.ada:216 Date: 2003-10-04T14:51:33+02:00 List-Id: >>>>> "christoph" == christoph grein writes: :: >> count = count + 1 :: >> :: >>The latter grates on my minimalist sensibilities like fingernails :: on a >>chalkboard :: :: Surely, if you have minimalist sensibilties you would replace: :: :: "count = count + 1" with "False"? : Depends on how "=" and "+" are defined ;-) Or on how count is defined :) with Ada.Text_IO; use Ada; procedure a_day is subtype Hour is Natural range 0..24; morning: constant Hour := 7; night: constant Hour := 23; the_hour: Hour := night; function count return Hour is -- backwards (strangely) begin if the_hour = morning then the_hour := night; delay Duration ( Hour'last - night + morning - Hour'first); end if; the_hour := the_hour - 1; return the_hour; end count; begin while count = count + 1 loop Text_IO.put_line("go on!"); -- management kind of assignment end loop; end a_day; -- Georg