fork download
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. procedure Check is
  3. procedure Sub (X: in out Integer;
  4. Y: in out Integer;
  5. Z: in out Integer) is
  6. begin
  7. Y := 8; Z := X;
  8. end;
  9. Foo: Integer := 9; Bar: Integer := 7;
  10. begin
  11. Sub (Foo,Foo,Bar);
  12. Put_Line (Integer'Image(Foo));
  13. Put_Line (Integer'Image(Bar));
  14. end Check;
Success #stdin #stdout 0.01s 1716KB
stdin
stdout
 8
 9