[fpc-pascal] Writeable typed constants - what's the point?
Martin Friebe
fpc at mfriebe.de
Thu Jun 18 12:00:14 CEST 2009
Graeme Geldenhuys wrote:
>>> FPC often implements something that breaks existing code.
>>>
>> Examples :)?
>>
>
>
> Please note that I am not saying I disagree with the changes. I know
> they were introduced for the better. What I am saying, is that changes
> do get introduced into FPC (for whatever reason) and does sometimes
> break existing code.
>
> Example #1:
> You cannot pass a property as var parameter anymore. Introduced in
> v2.2.0
>
> Example #2:
> Boolean type change in Xlib units. TBool(false) or TBool(true) type
> usage.
>
> Example #3:
> ComponentState change. I wasn't allowed to use the following code
> anymore: Include(ComponentState, csDesigning);
>
>
> I think there was a few more that affected fpGUI Toolkit project, but I
> think you get the idea. As long as code is being maintained, such
> changes are not the end of the world. :-) But my point is, they do happen!
>
>
Afaik 1 & 3 are the same?
And if I understand the changes where mad, because this "feature" was
broken before:
That is the syntax you mentioned lead to an unpredictable result, and
the circumstances under which it did what you wanted could change
outside your code and without the intend to make them change.
Or in other words: This only worked if a property directly read a
variable, but not if it was a function result => meaning you had 2
different types of properties. But only one was documented.
Best Regards
Martin
More information about the fpc-pascal
mailing list