comp.lang.ada
 help / color / mirror / Atom feed
* Ada 2012 and type access to in out functions
@ 2011-10-11 12:00 David Sauvage
  2011-10-11 12:05 ` AdaMagica
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Sauvage @ 2011-10-11 12:00 UTC (permalink / raw)


Using GNAT GPL 2011, I try to define a type that is an access to an in
out function, and the following example code [1] is illegal for the
compiler.

Is it an Ada 2012 restriction on using in out functions, a GNAT GPL
2011 limitation or a bug ?

Cheers,

[1]
-- gnatmake -gnat12 in_out_function_access_type.adb
procedure In_Out_Function_Access_Type is

   function Validate (Status : in out Boolean) return String
   is
   begin
      Status := True;
      return "command";
   end Validate;

   type Callback is access function (Status : in out Boolean) return
String;
   -- illegal  functions can only have "in" parameters.
   -- build successfully if the above line is commented
begin
   null;
end In_Out_Function_Access_Type;



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-12 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-11 12:00 Ada 2012 and type access to in out functions David Sauvage
2011-10-11 12:05 ` AdaMagica
2011-10-11 12:10 ` Yannick Duchêne (Hibou57)
2011-10-11 17:38   ` Adam Beneschan
2011-10-11 19:32     ` Yannick Duchêne (Hibou57)
2011-10-12 10:25 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox