//ini文件读写操作
function ReadAndWriteIni(fileName,sSection,sIdent,sValue:string;isboolean:Integer):string;
var
  tini : TIniFile;
begin
  try
    tini := TIniFile.Create(ExtractFilePath(ParamStr(0))+fileName);
    if isboolean = 0 then
    begin
      Result := tini.ReadString(sSection,sIdent,'');
    end
    else
    begin
      Result := tini.WriteString(sSection,sIdent,sValue);
    end;
  finally
    tini.Destroy;
  end;
end;
//下面是函数调用
ReadAndWriteIni('config.ini','config','user','',0);
编译是错误的信息:Incompatible types: 'String' and 'procedure, untyped pointer or untyped parameter'