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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news2.euro.net!newsfeed.freenet.ag!feeder.erje.net!eu.feeder.erje.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Dirk Heinrichs Newsgroups: comp.lang.ada Subject: Re: Simple loop with a strange output Date: Thu, 23 May 2013 22:41:46 +0200 Organization: Privat Message-ID: References: <7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com> NNTP-Posting-Host: pd9ffa50a.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: online.de 1369341707 16493 217.255.165.10 (23 May 2013 20:41:47 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 23 May 2013 20:41:47 +0000 (UTC) User-Agent: KNode/4.10.2 X-Original-Bytes: 2117 Xref: number.nntp.dca.giganews.com comp.lang.ada:181735 Date: 2013-05-23T22:41:46+02:00 List-Id: Luca Cappelletti wrote: > if you change the code using only the simple "loop - end loop" or change > the number into the while from 1009999999 to 1099999999 > > my output will be an infinite sequence of zero > > $./hello > 0 > 0 > 0 > 0 > ... > 0 > ... Did you leave something out in your output? I get: % ./hello start counting 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 -2147483648 0 0 0 0 0 And this is what I would expect, taking into account Adams and Simons replies. Bye... Dirk -- Dirk Heinrichs Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de