您的位置:首页 > 其它

Ada 函数指针

2015-03-16 15:03 211 查看
with Ada.Text_IO; use Ada.Text_IO;

procedure Main is



   type func_ptr is access procedure ( args : in String );


   

   procedure callee( msg : in String ) is

   begin

      Ada.Text_IO.Put_Line( msg );      

   end ;


   

   procedure caller( ptr : func_ptr ) is

   begin

      ptr( "In caller: send msg to callee" );

   end ;


   

begin

   caller( callee'Access );

end Main;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: