-- Print a simple message to demonstrate a trivial Ada program. with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line("Hello, world!"); end Hello;
Here's an explanation of each line:
Ada terminates each statement with a semicolon. This is like C and C++ and unlike standard Pascal (which uses semicolons as statement separators).
Unless you're using a very old browser you should see a button labelled "Compile with WebAda" below the source code. If you have a working connection to the Internet, just press that button and you'll compile the Ada code with the WebAda system. You can also make changes and see the effect of those changes. There are a few other buttons you may find useful: the "reset" button will restore the the original text, the "verbose" option will let you turn on or off verbose results, and the "configure" checkbox will let you change compilation options.
Just a quick note - if you're using an Ada 83 compiler instead of an Ada 95 compiler, please see the note about using Ada 83 before compiling this program. WebAda will normally use an Ada 95 compiler.
What is the name of the new procedure defined above?
|Go back to the previous section||Skip to the next section||Go up to lesson 1 outline|
David A. Wheeler (email@example.com)
The master copy of this file is at
The master copy of this file is at "http://www.adahome.com/Tutorials/Lovelace/s1s2.htm".