Ada Fundamentals - Hello World and Table of Squares




Overview


Ada Langauge Design Goals


Example 0: sayhi.adb

 
   -- Simple Ada program
   --   in file sayhi.adb

   with Ada.Text_IO;

   procedure sayHi is
   begin
      Ada.Text_IO.put("Hi!");    -- Output some text!
   end sayHi;
        


What's in a Name - Methods, Procedures, and the Main Routine



Comments



Program Structure



Package Ada.Text_IO



With Statement



Use Statement



Identifiers and Case Sensitivity



Literals


Example 1: Table of Squares and Cubes



Assignment Statement



Assignment in Java and C



Assignment Operator?



Initialization

     
         with ada.integer_text_io;
         procedure initialize is
            data1: Integer;
         begin 
             put(data1);
         end initialize;


Constants