From: Luca Cappelletti <luca.cappelletti@gmail.com>
Subject: Re: Simple loop with a strange output
Date: Thu, 23 May 2013 06:55:27 -0700 (PDT)
Date: 2013-05-23T06:55:27-07:00 [thread overview]
Message-ID: <588fe378-2a31-4b4a-ac5b-09f9a35bf76b@googlegroups.com> (raw)
In-Reply-To: <7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com>
Il giorno giovedì 23 maggio 2013 15:53:19 UTC+2, Luca Cappelletti ha scritto:
> Hello,
>
>
>
> I'm using GNAT 4.6 via Debian 7
>
>
>
> I've just compiled this simple code coming from a tutorial where I've just a little bit changed to fit my test:
>
>
>
>
>
> with Ada.Text_IO, Ada.Integer_Text_IO;
>
> use Ada.Text_IO, Ada.Integer_Text_IO;
>
> procedure Hello is
>
>
>
> procedure Raddoppia(Elemento: in out Integer) is
>
> begin
>
>
>
> Elemento := Elemento * 2;
>
>
>
> end Raddoppia;
>
>
>
> X : Integer;
>
>
>
> begin
>
>
>
> Put_Line("start counting");
>
> New_Line;
>
>
>
> X := 1;
>
> while X < 1009999999 loop
>
> Put(X);
>
> New_Line;
>
> Raddoppia(X);
>
> end loop;
>
>
>
> end Hello;
>
>
>
> that produce the expected:
>
>
>
> $./hello
>
> Ciao a tutti sto usando Put_Line direttamente con la clausola use
>
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
next prev parent reply other threads:[~2013-05-23 13:55 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 [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox