It's likely because it was written for an older version of the function IsEmptyStr, the current one takes an array of char as second parameter. So I think IsEmptyStr(auxstr,'0') should become IsEmptyStr(auxstr,['0']) https://www.freepascal.org/docs-html/rtl/strutils/isemptystr.html