Florian Klaempfl schrieb:
A class is not required, FPC supports unit-level properties as well :-)
True, but the issue with them is: you cannot use them to create a fool
proof read-only property without using a function because there is no
unit level encapsulation aka private/protected on unit level: the
variable read by the property cannot be in the implementation part of
the unit because it wouldn't be accessible at declaration time of the
property.
ACK
Making IsMultiThreaded a function is a no-no: it is used in really speed
critical code paths and using an inline function neither because it's
used mostly in assembler code
Simple solution: the variable continues to exist, under a different
name. The property only implements Delphi compatibility :-)
DoDi
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus