Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Ada-tut] Simple IO
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sat Oct 09, 2004 1:21 am   Post subject: [Ada-tut] Simple IO

Recap

code:
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.

code:
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.

code:
with Ada.Text_IO;
use Ada.Text_IO;
procedure Hello_World is
begin
   Put_Line("Hello, world!");
end Hello_World;
Sponsor
Sponsor
Sponsor
sponsor
JHanson90




PostPosted: Sat Oct 09, 2004 9:12 pm   Post subject: (No subject)

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




PostPosted: Sat Oct 09, 2004 9:15 pm   Post subject: (No subject)

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. Wink
JHanson90




PostPosted: Sat Oct 09, 2004 9:21 pm   Post subject: (No subject)

wtd wrote:
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. Razz
wtd




PostPosted: Sat Oct 09, 2004 9:25 pm   Post subject: (No subject)

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




PostPosted: Sat Oct 09, 2004 9:31 pm   Post subject: (No subject)

I'm dumb, just look at my avatar to see my usual expression Smile

<--------------------------------------
wtd




PostPosted: Sat Oct 09, 2004 9:58 pm   Post subject: (No subject)

It's not a problem. Smile

I used to complain that people thought I was younger than I was.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: