
-----------------------------------
wtd
Sat Oct 09, 2004 1:21 am

[Ada-tut] Simple IO
-----------------------------------
Recap

procedure Hello_World is
begin

end Hello_World;

Well that doesn't do a whole lot.  It doesn't even print "Hello, world!".  In fact, it does nothing.

Ada likes to put everything in modules

With Ada almost everything has to be accessed through modules.  As a result, the language makes dealing with modules quite easy.

For instance, to create our "Hello, world!" program we'll need the Put_Line procedure in the Ada.Text_IO module.

with Ada.Text_IO;
procedure Hello_World is
begin
   Ada.Text_IO.Put_Line("Hello, world!");
end Hello_World;

To avoid typing out Ada.Text_IO, you need simply use the "use" syntax.

with Ada.Text_IO;
use Ada.Text_IO;
procedure Hello_World is
begin
   Put_Line("Hello, world!");
end Hello_World;

-----------------------------------
JHanson90
Sat Oct 09, 2004 9:12 pm


-----------------------------------
You've made it clear that you know many programming languages quite extensively.  And now you tell us you know Ada too????  AAAAAAAAAHHHHHHHHHHHHHHHHHHHH

wtd, after you die from old age and too much computing, your brain will be examined and it will be found that it is actually a machine.

-----------------------------------
wtd
Sat Oct 09, 2004 9:15 pm


-----------------------------------
I'm still very much learning Ada95.  I find that often times explaining what I do know about it reinforces that knowledge in my memory.

And I'm 24 and aside from a recent bout with a bad cold, extremely healthy.  Put your scalpel away.  ;)

-----------------------------------
JHanson90
Sat Oct 09, 2004 9:21 pm


-----------------------------------
I'm not that old.  Though thinking about having a kid makes me feel older.This made me think you were like 40, but I've been known to take sarcasm too seriously.  :P

-----------------------------------
wtd
Sat Oct 09, 2004 9:25 pm


-----------------------------------
Wow.  Most people guess my age at around 30 until they see me, and even then, the beard fools them a bit too.

I've never heard 40 before.

-----------------------------------
JHanson90
Sat Oct 09, 2004 9:31 pm


-----------------------------------
I'm dumb, just look at my avatar to see my usual expression :)

