|
||||||
| Pascal/Delphi Forum for discussing Borland Delphi and Pascal coding techniques, tips and tricks. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
Did you try Google?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Finally we got that Python-forum! |
|
|||||
|
Quote:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Finally we got that Python-forum! |
| Sponsored Links |
|
|
|
|||
|
This is how to do it...
/Thor Code:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TFunctionPtr = function (P1: integer) : string;
function MyFunction(P1: integer): string;
begin
result := IntToStr(P1);
end;
procedure Caller(Func: TFunctionPtr; Version: integer);
begin
Writeln('My current Delphi version = ' + Func(Version));
end;
begin
Caller(MyFunction, 10);
Readln;
end.
Last edited by Thor; Today at 02:43 AM. Reason: CR/LF added |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inline function | Chinmoy | C Tutorials | 1 | 04-07-2008 03:13 PM |
| using Template function | Chinmoy | C Tutorials | 4 | 04-03-2008 04:16 AM |
| function pointer | Chinmoy | C Tutorials | 0 | 03-19-2008 12:52 AM |
| Derived Classes Can't Set Function Pointers | dargueta | C and C++ | 11 | 11-05-2007 09:04 PM |