Problem with Compare Value lazarus / 62-General ---------------------------------------------------------------------- Badger · 2020-06-27 02:17 Moving all my programs to new computer and have a problem with one of my Lazarus projects.  The following code gives the error:"Can't determine which overload function to call" on the CompareValue line although it worked on myu old machine. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function CompareTextAsCurrency: Integer;                        // Float        var c1,c2:Currency;          begin            if TryStrToCurr(Table.Cells[ACol,ARow],c1) and               TryStrToCurr(Table.Cells[BCol,BRow],c2) then            Result := CompareValue((c1), c2)            else Exit(0);          end;   I have moved from Lazarus v1.8.4  to 2.0.8 with the latest version of FPC I have done some looking but can't find info for this error relevant to this particular situation ---------------------------------------------------------------------- Thaddy · 2020-06-27 07:58 There is no overload for comparevalue(curr,curr) so the compiler can't decide. It may be an idea to file a bug report and ask for a comparevalue for currency. I have submitted a patch based on the code below... See https://www.freepascal.org/docs-html/rtl/math/comparevalue.html and https://bugs.freepascal.org/view.php?id=37275 E.g:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc}uses math;// this could be added to math and satisfies the convention used for the othersfunction CompareValue(const A, B  : Currency): TValueRelationship;begin  result:=GreaterThanValue;  if a=b then    result:=EqualsValue  else   if a