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. IOS-Archiver文件归档(2)

    Archiver是持久化数据的一种方式,他跟 Plist的差别在于他能持久化自己定义对象.但他没Plist那么方便. Archiver默认能持久化的数据有NSNumber,NSArray,NSDict ...

  2. Nginx/Apache图片缩略图技术

    1,目的 2,使用方式 3,Nginx + Linux 缩略图实现 3.1,原理 3.2,nginx配置实现 3.3,例子 4,Apache + Windows缩略图实现 4.1,环境 4.2,原理 ...

  3. [Android]使用platform密钥来给apk文件签名的命令

    1.使用platform密钥对apk进行签名 1.1.进入<Android_Source_Path>/build/target/product/security,找到[platform.p ...

  4. careercup-数学与概率 7.5

    7.5 在二维平面上,有两个正方形,请找出一条直线,能够将这两个正方形对半分.假定正方形的上下两条边与x轴平行. 解法: 要将两个正方形对半分,这条线必须连接两个正方形的中心点.利用slope=(y1 ...

  5. Android 自定义View修炼-仿QQ5.0 的侧滑菜单效果的实现

    有一段时间没有写博客了,最近比较忙,没什么时间写,刚好今天有点时间, 我就分享下,侧滑菜单的实现原理,一般android侧滑的实现原理和步骤如下:(源码下载在下面最后给出哈) 1.使用ViewGrou ...

  6. iOS CocoaPods自动管理第三方开源库

    最近在开发中发现在项目中使用了好多第三方库,然而第三方更新的时候本地却不能及时更新.然而CocoaPods则可以管理第三方依赖包的更新,这些“体力活”会被节省好多时间,下面介绍一下CocoaPods的 ...

  7. jedis访问redis学习笔记

    最近在学习redis,在网上查了些文章,利用他人已有的知识,总结写下了这篇文章,大部分内容还是引用别人的文章内容.经过测试发现spring-data-redis现在有的版本只能支持reids 2.6和 ...

  8. day-4

    /* 早上黑板上的倒计时变成了120小时 嗯 很快就要结束了 上午考试 据老师说很简单 老师 :"我就说说~"..... 下午改题 T3好辣脑子 感觉智商不够了 T2dp写丑了 然 ...

  9. 参加魅族 flyme 互联网编程大赛的一些感受

    为期两天的 flyme 编程大赛已经结束了,自己也在这次大赛中深有感触,受益颇丰. 在这次大赛里,认识到了很多厉害的开发者,有单打独斗的,也有四五成群的.开幕致辞上看到很多非常有创意的点子,感觉每个队 ...

  10. JavaScript高级程序设计(一):JavaScript简介

    一.JavaScript实现 1.一个完整的JavaScript包含三个部分组成: 1)ECMAScript 核心 2)DOM文档对象模型 3)BOM浏览器对象模型 2.文档对象模型(DOM) 文档对 ...