Ir para conteúdo
Fórum Script Brasil

Matoso

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Matoso

Matoso's Achievements

0

Reputação

  1. Hoje fui migrar para o Delphi XE10 e me deparei com um erro que não estou sabendo resolver! Essa função foi criada no Delphi 7 e roda normalmente. Quando fui migrar o projeto todo para Delphi XE10, essa função não foi aceita rs. Alguém poderia me ajudar? Gostaria de entender o erro também!! Obrigado function ABNTRound(xValor:Extended; Decimals:SmallInt):Extended; var VM : Extended; P, F, P2, F2 : Extended; begin VM := Power(10, Decimals); P := Int(xValor); F := StrToFloat(FloatToStr(Frac(xValor) * VM)); P2 := Val(Int(F)); F2 := Val(Frac(F)); if F2 > 0.5 then begin P2 := P2 + 1; end else begin if ((10 * Val(F2)) >= 4.9999) and ((10 * Val(F2)) <= 5.0001) then begin if Frac(P2 / 2) > 0 then P2 := P2 + 1; end; end; P2 := P2 / VM; Result := P + P2; end; [dcc32 Error] uLibrary.pas(5356): E2008 Incompatible types
×
×
  • Criar Novo...