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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.59.205 with SMTP id m13mr6376680qah.7.1369317327619; Thu, 23 May 2013 06:55:27 -0700 (PDT) X-Received: by 10.49.39.3 with SMTP id l3mr1231358qek.26.1369317327548; Thu, 23 May 2013 06:55:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!news.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!t14no438905qam.0!news-out.google.com!y6ni51092qax.0!nntp.google.com!ch1no801449qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 23 May 2013 06:55:27 -0700 (PDT) In-Reply-To: <7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.208.111.82; posting-account=oHzcLgoAAABFpNphGe9IcFOcH3Xdo-As NNTP-Posting-Host: 81.208.111.82 References: <7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <588fe378-2a31-4b4a-ac5b-09f9a35bf76b@googlegroups.com> Subject: Re: Simple loop with a strange output From: Luca Cappelletti Injection-Date: Thu, 23 May 2013 13:55:27 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:15637 Date: 2013-05-23T06:55:27-07:00 List-Id: Il giorno gioved=EC 23 maggio 2013 15:53:19 UTC+2, Luca Cappelletti ha scri= tto: > Hello, >=20 >=20 >=20 > I'm using GNAT 4.6 via Debian 7 >=20 >=20 >=20 > I've just compiled this simple code coming from a tutorial where I've jus= t a little bit changed to fit my test: >=20 >=20 >=20 >=20 >=20 > with Ada.Text_IO, Ada.Integer_Text_IO; >=20 > use Ada.Text_IO, Ada.Integer_Text_IO; >=20 > procedure Hello is >=20 >=20 >=20 > procedure Raddoppia(Elemento: in out Integer) is >=20 > begin >=20 > =20 >=20 > Elemento :=3D Elemento * 2; >=20 > =20 >=20 > end Raddoppia; >=20 >=20 >=20 > X : Integer; >=20 >=20 >=20 > begin >=20 >=20 >=20 > Put_Line("start counting"); >=20 > New_Line; >=20 >=20 >=20 > X :=3D 1;=20 >=20 > while X < 1009999999 loop >=20 > Put(X); >=20 > New_Line; >=20 > Raddoppia(X); >=20 > end loop; >=20 >=20 >=20 > end Hello; >=20 >=20 >=20 > that produce the expected: >=20 >=20 >=20 > $./hello >=20 > Ciao a tutti sto usando Put_Line direttamente con la clausola use >=20 sorry there was a paste error from 2 text files the right output was: $ ./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 thanks Luca