FPC is 100% compatible to delphi in Delphi mode (no need for @ altough using @ is much nicer IMHO, makes things clear).

What you're describing are basic callbacks.

Say you got:

[pascal]
procedure SomeProcedure;
begin
// user defined stuff
end;

var
StoredProc: TProcedure; // defined in system, but you can type specific ones as you need
[/pascal]

An you want to assign SomeProcedure to StoredProc. If you use delphi mode you do:

StoredProc := SomeProcedure;

in FPC modes (e.g.: ObjFpc) you do:

StoredProc := @SomeProcedure;

If you use OOP, you need to use "procedure of object" type for the procedure variable e.g:

[pascal]

type
TUserClass = class
public
procedure OnClick;
end;

TCallBack = procedure of object;

var
StoredProc: TCallBack;

[/pascal]

Assignment is then basically the same, you just use [@]object.method;

You can check if it's assigned by checking the StoredProc for nil (no need to set it to nil in objects or globals, both FPC and Delphi nil their variables in these cases) e.g.:

[pascal]

if Assigned(StoredProc) then
StoredProc();

[/pascal]

Notice the (). They are important especially if the StoredProc is a function returning something valid (a pointer would be a nice trap). To make sure the compiler stores the result of the function CALL instead of it's address (in delphi mode only, FPC has it clear) you need to put the () there even if it doesn't take address.

For example:

[pascal]

type
TStoredFunc = function: Pointer;

var
StoredFunc: TStoredFunc; // let's say it got assigned elsewhere
p: Pointer;

begin
if Assigned(StoredFunc) then
p := StoredFunc; // error in delphi mode, p will contain address of StoredFunc
end;

[/pascal]