[fpc-pascal]A couple of easy questions on clsses
Matt Emson
memsom at interalpha.co.uk
Fri Aug 15 12:54:07 CEST 2003
> It depends what you mean with 'static'. In classes, the term 'static'
> has no defined meaning. You have 'normal' methods (where SELF is
> defined) and class methods (where SELF is not defined).
Note also that Class Methods kind of act as if they are external to the
class - like tacked on procedures and functions. You can test this by using
the following example:
type
TMyTestClass = class
public
class procedure Test( AString: string ); //test calls
'writeln(AString);'
end;
...
TMyTestClass.Test('Hello'); //no instance variable.. output is 'Hello' to
console
Hope that helps...
Matt
More information about the fpc-pascal
mailing list