测试源代码如下:问题是定义的数据类型和输入的数据类型都是数据型,为何提示types of actual and formal var parameters must be identical错误
private
    { Private declarations }
    function ClorFont(var clr:integer):string;这里定义了一个函数
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}
function Tform1.ClorFont(var clr:integer):string;
begin
    case clr of
    0:begin
        result:='CLBack';
    end;
    1:begin
        result:='CLRed';
    end;
 end;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
    edit1.Text:=ClorFont(1);这里调用就出现了行参和实参不配备,可明明给的1也数据类型
end;end.