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;
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;
相关文章推荐
- 关于函数和字符指针的一些看法。
- 用指针处理C语言中不定数目的函数参数
- 成员函数指针与高性能的C++委托(上篇)
- Item 14. 函数指针(Function Pointers)
- Item 16. 指向成员函数的指针
- Item 14. 函数指针(Function Pointers)
- 水滴石穿C语言之指针、数组和函数
- 【分析】一个C++溢出虚函数指针的更真实试验
- 【例子】一个C++溢出虚函数指针的更真实试验
- typedef使用大全3(指向函数的指针)
- 函数指针point of function
- 使用指针来将多维数组传递给函数
- 成员函数指针与高性能的C++委托(中篇)
- 14、函数的传值和传指针
- 成员函数指针与高性能的C++委托(上中下篇)
- 成员函数指针与高性能的C++委托(中篇)
- 指向函数的指针数组
- C语言之指针、数组和函数
- Item 16. 指向成员函数的指针
- Item 16. 指向成员函数的指针