From: Dirk Heinrichs <dirk.heinrichs@altum.de>
Subject: Re: Simple loop with a strange output
Date: Thu, 23 May 2013 22:41:46 +0200
Date: 2013-05-23T22:41:46+02:00 [thread overview]
Message-ID: <knluua$g3d$1@online.de> (raw)
In-Reply-To: 7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com
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 <dirk.heinrichs@altum.de>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de
prev parent reply other threads:[~2013-05-23 20:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 13:53 Simple loop with a strange output Luca Cappelletti
2013-05-23 13:55 ` Luca Cappelletti
2013-05-23 14:37 ` Adam Beneschan
2013-05-23 14:41 ` Adam Beneschan
2013-05-23 16:09 ` Luca Cappelletti
2013-05-23 16:40 ` Simon Wright
2013-05-23 21:34 ` Randy Brukardt
2013-05-24 7:21 ` Simon Wright
2013-05-24 12:46 ` Britt
2013-05-23 20:41 ` Dirk Heinrichs [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox