Re: [fpc-pascal] Why has the tkFloat default value changed?

2021-03-06 Thread Ondrej Pokorny via fpc-pascal

On 06.03.2021 4:29, Ondrej Pokorny wrote:

On 05.03.2021 20:34, Sven Barth wrote:

Am 28.02.2021 um 23:11 schrieb Mattias Gaertner via fpc-pascal:
[...]

I can't find this change in
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0


@Ondrej: you had supplied the patch back then. Would you be able to 
describe what exactly changed through your patch?


I added a point to 
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0#RTTI_changes


I forgot to add a short personal rant :)

The ambiguity of the /stored/ and /(no)default/ modifiers is a huge 
source of confusion and errors. Such a bad design :/ (Obviously FPC is 
not liable for it.)


Having only the "stored" modifier would be so much simpler. (And you 
would be able to store all integer values in a property - currently you 
always have to choose one value that is not stored.)


Ondrej

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why has the tkFloat default value changed?

2021-03-06 Thread Ondrej Pokorny via fpc-pascal

On 05.03.2021 20:34, Sven Barth wrote:

Am 28.02.2021 um 23:11 schrieb Mattias Gaertner via fpc-pascal:
[...]

I can't find this change in
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0


@Ondrej: you had supplied the patch back then. Would you be able to 
describe what exactly changed through your patch?


I added a point to 
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0#RTTI_changes


Ondrej

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why has the tkFloat default value changed?

2021-03-06 Thread Sven Barth via fpc-pascal
Ondrej Pokorny  schrieb am Sa., 6. März 2021, 04:29:

> On 05.03.2021 20:34, Sven Barth wrote:
> > Am 28.02.2021 um 23:11 schrieb Mattias Gaertner via fpc-pascal:
> > [...]
> >> I can't find this change in
> >> https://wiki.lazarus.freepascal.org/User_Changes_3.2.0
> >
> > @Ondrej: you had supplied the patch back then. Would you be able to
> > describe what exactly changed through your patch?
>
> I added a point to
> https://wiki.lazarus.freepascal.org/User_Changes_3.2.0#RTTI_changes


Thank you! :)

Regards,
Sven

>
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why has the tkFloat default value changed?

2021-03-05 Thread Sven Barth via fpc-pascal

Am 28.02.2021 um 23:11 schrieb Mattias Gaertner via fpc-pascal:

Hi,

In FPC 3.2.0 the default "Default" value of a single/double property
has changed from $8000 (fpc 3.0.4) to 0.

This breaks TWriter.
The $8000 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 $8000 again you need to append 
"nodefault" to the property.



I can't find this change in
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0


@Ondrej: you had supplied the patch back then. Would you be able to 
describe what exactly changed through your patch?


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why has the tkFloat default value changed?

2021-03-01 Thread Peter via fpc-pascal

On 28/02/2021 22:11, Mattias Gaertner via fpc-pascal wrote:

Hi,

In FPC 3.2.0 the default "Default" value of a single/double property
has changed from $8000 (fpc 3.0.4) to 0.

This breaks TWriter.
The $8000 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.

I can't find this change in
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0

Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Maybe this is related to bugs 33564 & 31985 ?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Why has the tkFloat default value changed?

2021-02-28 Thread Mattias Gaertner via fpc-pascal
Hi,

In FPC 3.2.0 the default "Default" value of a single/double property
has changed from $8000 (fpc 3.0.4) to 0.

This breaks TWriter.
The $8000 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.

I can't find this change in
https://wiki.lazarus.freepascal.org/User_Changes_3.2.0

Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal