Deine Idee kann man so formulieren:
Delphi-Quellcode:
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
function A: Integer;
begin
Result := 1;
end;
function B: Integer;
begin
Result := 2;
end;
function C: Integer;
begin
Result := 3;
end;
function D: Integer;
begin
Result := 4;
end;
type
TMyFunction = function: Integer;
var
Steps: array of TMyFunction;
Step: Integer;
res: Integer;
begin
SetLength(Steps, 4);
Steps[0] := A;
Steps[1] := B;
Steps[2] := C;
Steps[3] := D;
for Step := 0 to High(Steps) do
res := Steps[Step];
end.