[fpc-pascal] FPC class syntax was extended to support delphi code

Doug Chamberlin dougchamberlin at earthlink.net
Wed Jan 13 19:33:34 CET 2010


David Emerson wrote:
> b. What does "strict private" mean, as opposed to private without 
> strict? (My best guess is that it would be accessible only within the 
> methods+properties of that class within the unit, as opposed to being 
> available anywhere in the same unit where the class is declared...???)

In Delphi what you have described is exactly what strict private gives you.

> c. What is the purpose of a class method? It would seem to me that 
> methods should do the same thing whether they are class methods or not. 
> Traditional variables change from instance to instance, but methods do 
> not vary between instances, as far as I know-- right?

Class methods allow you to call the method without instantiating the 
class first. For example, Result := TMyClass.MyClassFunction;

-- 
Doug C.
-----
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



More information about the fpc-pascal mailing list