-- Ada parameter-passing demonstration program. -- This shows that the gnatmake 8.1 compiler uses pass-by-value-result -- for the in out parameter. -- https://stackoverflow.com/questions/37210311/call-by-result-example with Gnat.Io; use Gnat.Io; procedure hello is x : Integer; Procedure NonSense (A: in out integer) is begin x := x + 1; A := A + 4; Put(x); end NonSense; begin x := 0; NonSense (x); Put(" "); Put(x); New_Line; end hello;