vilon
2007-12-13 09:06:01
Hi, was thinking about how you could call a procedure/function in some way, by specifing the name as an argument in a function. It could look like this:
Do anyone know if this is possible? And if it is, how?
program FunctionAsArgument;
function Done: Boolean;
begin
Result := True;
end;
function WaitFor(NAME): Boolean; // NAME would be the name of the function to call
begin
repeat
Wait(100);
until(NAME); // Waits until the specified function returns true
end;
begin
WaitFor(Done);
end.Do anyone know if this is possible? And if it is, how?