program Project1;

{$APPTYPE CONSOLE}
{$R *.res} uses
System.SysUtils; type
TVoice = function(): String; function WithAmericanDoll(): String;
begin
Result := 'Oh yes, Oh, F M.';
end; function WithJapanDoll(): String;
begin
Result := 'ah, a~ah, eku..eku..';
end; function MkLove(voice: TVoice): String;
begin
Result := voice();
end;
var
temp: String;
begin
try
{ TODO -oUser -cConsole Main : Insert code here }
Writeln('1.AmericanDoll.');
Writeln(' ' + MkLove(WithAmericanDoll));
Writeln('1.JapanDoll.');
Writeln(' ' + MkLove(WithJapanDoll));
Readln;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end; end.

Function Pointer in Delpni的更多相关文章

  1. C 函数与指针(function & pointer)

    C 函数与指针(function & pointer) /* * function.c * 函数在C中的使用 * */ #include <stdio.h> int noswap( ...

  2. 类非静态成员的函数指针 的使用 Function pointer of a non-static member function of a class

    you can get the pointer of the method, but it has to be called with an object typedef void (T::*Meth ...

  3. tips~function pointer

    An simple example: #include<stdio.h> int plus(int a,int b) { return a+b; } int main() { int (* ...

  4. 指向函数的指针 ------ 函数指针(function pointer)

    函数指针: 指向函数的指针, 首先是一个指针, 这个指针指向一个函数. 函数具有可赋值给指针的物理内存地址,一个函数的函数名就是一个指针,它指向函数的代码.一个函数的地址是该函数的进入点,也是调用函数 ...

  5. 44(function pointer 2)

    #include<iostream> using namespace std; class A { public: int x; int sayhello() { cout<< ...

  6. 43(function pointer 1)

    #include<iostream> using namespace std; typedef int A; typedef void (*PF)(); typedef int (*P_A ...

  7. C++ function pointer and type cast

    http://www.cprogramming.com/tutorial/function-pointers.html http://www.cplusplus.com/doc/tutorial/ty ...

  8. 指针函数(Pointer Function)和函数指针(Pointer to Function或Function Pointer)

    一.指针函数 1.解释:指针函数很好理解:简单来说,就是一个返回指针的函数,本质是一个函数.如: int fun(int x,int y);    //这是一个普通函数的声明,返回值是一个int类型, ...

  9. Using a Comparison Function for the Key Type

    (这是C++系列随笔的第二篇,这一系列是我练习C++而查的资料) C++ Primer 5th. Ed. pp. 425 ---------------------- Using a Comparis ...

随机推荐

  1. [ATL/WTL]_[0基础]_[CBitmap复制图片-截取图片-平铺图片]

    场景: 1.当你须要截取图片部分区域作为某个控件的背景. 2.须要平铺图片到一个大区域让他自己主动放大时. 3.或者须要合并图片时. 代码: CDC sdc; CDC ddc; sdc.CreateC ...

  2. Override ListView getAdapter造成的后果

    近期工作中,发现了一个bug,是和ListView Adapter有关的.产生了FC,描写叙述信息大约是 "The content of the adapter has changed bu ...

  3. Linux select TCP并发服务器与客户端编程

    介绍:运行在ubuntu linux系统,需要先打开一个终端运行服务端代码,这时,可以打开多个终端同时运行多个客户端代码(注意客户端数目要小于MAX_FD);在客户端输入数据后回车,可以看见服务器收到 ...

  4. 没有找到MSVCR100.dll解决方法

    转自:http://hi.baidu.com/fjdvd/blog/item/3679b201ec3d6b154afb515d.html MSVCR100.dll下载(游戏丢失msvcr100.dll ...

  5. 【转】最新基于adt-bundle-windows-x86的android开发环境搭建

    http://blog.csdn.net/wangqiuyun/article/details/8731240 某系统要配套做一个android客户端,来一次android开发环境快速搭建,系统Win ...

  6. TCP/IP协议原理与应用笔记15:网络连接设备

    1. 网络连接设备: (1)转发器 Repeater/ 集线器 Hub (2)网桥 Bridge / 交换机 Switch (3)路由器 Router (4)网关 Gateway 2. 从通信角度看待 ...

  7. 导出EXCEL数据时防止数值变科学计数的办法

    网上有很多说法,最简单直接正确的做法是判断一下是否为数值以及长度,然后给单元格加上以下CSS即可: mso-generic-font-family:auto;   mso-font-charset:1 ...

  8. Block块

    block的标志:^ 特点: 1.可以保存代码 2.有返回值 3.有形参 4.调用方式和c语言一样 5.可以访问外部变量,但不能修改变量的值:如果使用__block关键字修饰的变量才可以. 1)创建 ...

  9. 亿能测试白盒安全测试模板V1.0发布

    亿能测试白盒安全测试模板V1.0发布http://automationqa.com/forum.php?mod=viewthread&tid=2911&fromuid=21

  10. redis resque消息队列

    Resque 目前正在学习使用resque .resque-scheduler来发布异步任务和定时任务,为了方便以后查阅,所以记录一下. resque和resque-scheduler其优点在于功能比 ...