Hello!

Let's get to it!

This is an Ada Program:

You may be missing curly brackets. Get used to it. The only curls you are gonna see from now on are in the beauty salon.

The program shall be in a text file with the extension .adb

I recommend you get a look at the processing instructions before you keep going, to make sure you can compile the code in your own computer.

Let's go through the lines of the program one by one:

With links the library. Text_IO ©️ Analog to #include. using namespace has the analog use

Procedure defines the program as a "return void function". As the concept of void-function is oxymoronic, we define modules of a process as procedures or functions (if they indeed return something).

Hello_World is the name of the main program. The text file should have this name with the extension .adb, in small caps. The process with the name of the file is the main (root) function.

is starts the declaration section. Here you do the declarations. It saves the memory space you need during the running of the program. This way you will never run out of memory at half a run time.

use Ada.Text_IO brings that library into scope. ©️ Analog to using

begin tells you the algorithm section starts there. ©️ Analog to { (though not always, after C++17's initialization with brackets feature).

Put is a process to write text from Text_IO. ©️ Analog to printf or cout <<

"Hello World!" is a standard string of text. Attention: In Ada Strings are first class types. Consisting of an array of undetermined size until declaration. They are an array of characters.

end Hello_World specifies the process that it closes. If not specified it will close the last process. ©️ Analog to }

Comments are declared with a double line -- which to many (Spanish speakers p.e.) will remind of a dialog mark in written media β€”

White spaces and new lines and all blank lines are all ignored. You can use them to structure concepts as in one line one idea and separate sets of ideas. Or write everything in one line. But that's not my advice. Anyway, Ada is a free-format language so position will not affect the code. Just remember to put semicolons in place.

An Ada program should only contain the root program, but subprograms can be declared inside the declaration, or better yet: in packages.

Let's see how we can link program units: