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. XML模式:Dublin Core

    Dublin Core 标准是一种信息分类方法,常用于图书馆.Dublin Core 标准有一个 XML Schema 定义了如何使用 XML 描述这类信息.Dublin Core 可以有效地对各种信 ...

  2. 揭秘淘宝自主研发的文件系统:TFS

    目前,国内自主研发的文件系统可谓凤毛麟角.淘宝在这一领域做了有效的探索和实践,Taobao File System(TFS)作为淘宝内部使用的分布式文件系统,针对海量小文件的随机读写访问性能做了特殊优 ...

  3. SqlServer数据库的一些方法的用途

    一直分不清这三种方法的具体用法现在终于找齐了 ExecuteNonQuery方法和ExecuteScalar方法和ExecuteReader方法的区别 (1)ExecuteNonQuery():执行命 ...

  4. 【转】Java Thread.join()详解

    http://www.open-open.com/lib/view/open1371741636171.html 一.使用方式. join是Thread类的一个方法,启动线程后直接调用,例如: ? 1 ...

  5. 仰视源代码,实现memcpy

    C++实现内存的复制 通常我们使用深复制就是通过内存复制实现的,可是对象的复制涉及到基类派生类及其相关类的问题.这里不讨论. 目的为了可以明确内存复制的底层实现. void* memcpy(void* ...

  6. 在配置XML时报的The reference to entity "dataSource" must end with the ';' delimiter错误

    <?xml version="1.0" encoding="UTF-8"?> <ECharts> <element>http ...

  7. css 常见兼容性问题及解决方案

    css 兼容问题一直是困扰前端开发人员的大难题,提到兼容性立马想到了万恶的ie6,说多了都是泪,还是整理一些常见的兼容性问题以及解决的方案吧. 一. 浮动元素双边距. ①条件:ie6下,如果给元素设置 ...

  8. mysqldump 备份原理8

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; http://www.cnblogs.com/lyhabc/p/38 ...

  9. qt QSqlQuery

    QT数据库QSqlQuery   SQL执行操作 QSqlQuery提供了对数据库记录的Select.Insert.Update.Delete操作. SELECT操作: QSqlQuery query ...

  10. 分享asp.net学习交流社区

    亲们 最近发现一个很好的asp.net学习交流的QQ群——237221223.爱好asp.net的亲们可以加入到大家庭中去哈.大家在一起交流学习