On 27.02.2013 08:40, xrfang wrote:
Hi All,
My class looks like this:
TMyClass = class
FField1: Integer;
private
FField2: string;
public
FField3: string;
end;
Question is, is FField1 private or public or protected? For all lcl
classes,
I see a lot of fields above "private", it looks like they are same as
"public",
because I can access them from outside. But why allow them to be put
there instead of directly under "public"?
The default visiblity of classes is "public" EXCEPT they are declared
inside when {$M+} was given or a parent class was declared that way
(e.g. Classes.TPersistant). In that case the default visiblity is
"published".
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus