Ada Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



given this example:

with text_io;
use text_io;

procedure a is
procedure foo ( X:Integer; Y:OUT Integer) is begin
  if (X>24) then
    Y:=16;
  end if;
end;

a:integer:=0;
b:integer;

begin
   foo(a,b);
   text_io.put_line(integer'image(b));
end;


gnat 4.6 prints out a randome value. (well in my case I get 1, but it is
meaningless)

shouldn't I get a run time exception.  Calling a procedure with an OUT
parameter and never giving it a value.
i am not an ada lawyer, but I would think an exception would be in order
here.


--bud davis

 




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux