Smartzkid
2009-03-05 17:53:56
Hey guys, I'm getting an Out of Proc Range error in a script trying to call a procedure that's assigned during runtime. I don't recall how to resolve this error, any insight?
2009-03-05 17:53:56
2009-03-05 17:56:26
2009-03-05 18:14:33
program Example;
var
theProc: procedure;
procedure ProcToCall;
begin
writeln('Success!');
end;
procedure SetProc(proc: procedure);
begin
theProc := proc;
end;
procedure CallProc;
begin
theProc();
end;
begin
SetProc(@ProcToCall);
CallProc;
end.2009-03-05 18:26:34
program Example;
var
theProc: procedure;
procedure ProcToCall;
begin
writeln('Success!');
end;
procedure SetProc(proc: procedure);
begin
theProc := variant(proc);
end;
procedure CallProc;
begin
theProc();
end;
begin
SetProc(@ProcToCall);
CallProc;
end.That what you need?
2009-03-05 18:29:30
2009-03-05 18:33:13
2009-03-05 18:46:16