That problem is located in unit ZDbcInterbase6Utils
function TZResultSQLDA.GetFloat(const Index: Integer): Single;
var
SQLCode: SmallInt;
begin
CheckRange(Index);
{$R-}
with FXSQLDA.sqlvar[Index] do
begin
Result := 0;
if (sqlind <> nil) and (sqlind^ = -1) then
Exit;
SQLCode := (sqltype and not(1));
if (sqlscale < 0) then
begin
case SQLCode of
SQL_SHORT : Result := PSmallInt(sqldata)^ / IBScaleDivisor[sqlscale];
SQL_LONG : Result := PInteger(sqldata)^ / IBScaleDivisor[sqlscale];
SQL_INT64,
SQL_QUAD : Result := PInt64(sqldata)^ / IBScaleDivisor[sqlscale];
SQL_DOUBLE : Result := PDouble(sqldata)^;
else
raise EZIBConvertError.Create(Format(SErrorConvertionField,
[GetFieldAliasName(Index), GetNameSqlType(SQLCode)]));
end;
end
else
case SQLCode of
SQL_DOUBLE : Result := PDouble(sqldata)^;
SQL_LONG : Result := PInteger(sqldata)^;
SQL_D_FLOAT,
SQL_FLOAT : Result := PSingle(sqldata)^;
SQL_BOOLEAN : Result := PSmallint(sqldata)^;
SQL_SHORT : Result := PSmallint(sqldata)^;
SQL_INT64 : Result := PInt64(sqldata)^;
SQL_TEXT : Result := StrToFloat(DecodeString(SQL_TEXT, Index));
SQL_VARYING : Result := StrToFloat(DecodeString(SQL_VARYING, Index));
else
raise EZIBConvertError.Create(Format(SErrorConvertionField,
[GetFieldAliasName(Index), GetNameSqlType(SQLCode)]));
end;
end;
{$IFOPT D+}
{$R+}
{$ENDIF}
end;
If you ask Delphi to evaluate it, it gives you '3.3' (which is correct)
but if you Result, at the end of the procedure is 3.29999995231628
Really strange behaviour