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. Put_Line (Integer'Image(X));
  9. Put_Line (Integer'Image(Y));
  10. Put_Line (Integer'Image(Z));
  11. end;
  12. Foo: Integer := 9; Bar: Integer := 7;
  13. begin
  14. Sub (Foo,Foo,Bar);
  15. Put_Line (Integer'Image(Foo));
  16. Put_Line (Integer'Image(Bar));
  17. end Check;
Success #stdin #stdout 0.01s 1716KB
stdin
stdout
 9
 8
 9
 8
 9