% 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 **** |