[fpc-pascal]class variable
Peter Vreman
peter at freepascal.org
Fri Apr 4 07:48:39 CEST 2003
> Hello!
>
>> Can any tell me if there's "Class Variable" in free pascal like in
>> java?
>> I mean, in java, you can declare a class memeber to be "static", all
>> instance of this class share the same variable memory. Such a member can
>> be
>> accessed through class name without any instantiation.
>> Does free pascal will add such a feature in the future?
>
> AFAIK, class variables are not supported yet, nor are class properties.
> But
> it's possible to use class methods, which in turn access a global
> variable.
Sorry that is wrong, static class members are supported, you need to
enable the static keyword using -St
I don't know what you mean with class properties.
-
More information about the fpc-pascal
mailing list