Am 20.12.2011 09:53, schrieb Mattias Gaertner:
On Tue, 20 Dec 2011 12:51:29 +0400
Alexander Shishkin<[email protected]> wrote:
20.12.2011 4:00, Paul Ishenin пишет:
18.12.2011 20:45, Jonas Maebe wrote:
And final fields.
Final methods can't be overriden in the descendants. But what are final
fields for?
It`s something like writeable constant, but writeable only in constructor.
Can someone explain the pascal syntax?
According to example classes (JAImage, JAFGlyphJustificationInfo) in
http://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/jvmbackend/rtl/java/jdk15.inc?revision=19030&view=markup
it is like the following:
TFoo = class
final var
fField1: Integer;
fField2: Integer;
final class var
fClassField1: Integer;
fClassField2: Integer;
end;
Please note: Every field (final or not) can be followed by a "external
name 'FieldName'" clause if the class is "external" as well (you can see
this in the mentioned example classes)
You also might want to read this:
http://wiki.freepascal.org/FPC_JVM/Language#New_language_features
Regards,
Sven
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel