[fpc-pascal] Why has the tkFloat default value changed?
pascaldragon at googlemail.com
Fri Mar 5 20:34:17 CET 2021
Am 28.02.2021 um 23:11 schrieb Mattias Gaertner via fpc-pascal:
> In FPC 3.2.0 the default "Default" value of a single/double property
> has changed from $80000000 (fpc 3.0.4) to 0.
> This breaks TWriter.
> The $80000000 means the property has no default value.
> Now FPC 3.2.0 no longer writes a property if the value is 0.0, no
> matter what the stored function says.
> For example:
> property S: Single read FSingle write FSingle stored IsSStored;
> FPC 3.0.4 TWriter does write S if S=0.0 and IsSStored returns true.
> FPC 3.2.0 does not.
It was indeed the fix for Mantis #31985 (
https://bugs.freepascal.org/view.php?id=31985 ) that changed this and
the behavior of the RTTI is Delphi-compatible now.
If you want the default value to be $80000000 again you need to append
"nodefault" to the property.
> I can't find this change in
@Ondrej: you had supplied the patch back then. Would you be able to
describe what exactly changed through your patch?
More information about the fpc-pascal