Department of Mathematics FAS Harvard University One Oxford Street Cambridge MA 02138 USA Tel: (617) 495-2171 Fax: (617) 495-5132
FAS Computer Services to Harvard University IT: (617) 495-7777.
Ada is a powerful development language with features comparable to Java and execution speeds similar to, and sometimes exceeding C. Here is an example of a program "numbers.nb":
with Gnat.Io; use Gnat.Io;

procedure numbers is
   A,B,C: Integer;
begin
   Put("First number A: ");  Get(A);
   Put("Second number B: "); Get(B);
   C := A*A + B*B;
   Put("||(A,B)||^2 is "); Put(Integer(C)); New_Line;
end numbers;
You can compile it with
gnatmake numbers.adb


Simplicity, Clarity, Generality B.W. Kernighan, R. Pike, in "The Practice of Programming".
Privacy
HTML CSS