From: Marcus F <trenatos@gmail.com>
Subject: Beginner issue..
Date: Sat, 15 Jun 2013 23:54:29 -0700 (PDT)
Date: 2013-06-15T23:54:29-07:00 [thread overview]
Message-ID: <5788c60d-fb8c-4058-9ae9-414dd77a3dc4@googlegroups.com> (raw)
Hi!
I'm Marcus, I'm completely new to ADA but not to programming.
I'm looking at a simple tutorial guide to pick up some basics of ADA, but I ran into an issue that I don't understand.
Here's the trivial example I followed:
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;
procedure Compute is
procedure Double(Item : in out Integer) is
begin -- procedure Double.
Item := Item * 2;
end Double;
X : Integer := 1; -- Local variable X of type Integer.
begin -- procedure Compute
loop
Put(X);
New_Line;
Double(X);
end loop;
end Compute;
Now, I expect X to double once per loop, but when I build and run, I just get 0's scrolling down my screen.
Could someone help out a newbie?
next reply other threads:[~2013-06-16 6:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 6:54 Marcus F [this message]
2013-06-16 7:00 ` Beginner issue Marcus F
2013-06-16 7:21 ` Dmitry A. Kazakov
2013-06-16 7:52 ` Marcus F
2013-06-16 7:55 ` Marcus F
2013-06-16 8:49 ` Dmitry A. Kazakov
2013-06-16 18:32 ` Marcus F
2013-06-16 7:30 ` 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