Simula: A roots of every OO Language

[top]

  1. One of offsprings of Algol family.
  2. Mother of all object-oriented language.
  3. Example: Using class object.

    % a sample Simula program
    begin
        class Greetings(n); integer n;
        begin
            procedure Say(s); Text s;
            begin integer i;
                for i := 1, 2 * i while i < n do begin
                    Outint(i, 5);
                    Outtext(" ");
                    Outtext(s);
                    Outimage
                end
            end;
            Outtext("new Greetings created with n=");
            Outint(n, 0);
            Outimage
        end;
        ref(Greetings) howdy;
        howdy :- new Greetings(Inint);
        howdy.Say("hello, world");
    end **** of sample Simula program ****
    

[top]