Difference between revisions of "Class constants"
From Lazarus wiki
Jump to navigationJump to searchJwdietrich (talk | contribs) (Categorization) |
Jwdietrich (talk | contribs) |
||
Line 24: | Line 24: | ||
[[Category:FPC]] | [[Category:FPC]] | ||
− | [[Category: | + | [[Category:Constants]] |
Revision as of 01:44, 3 November 2014
FP supports typed class constants, if the compiler-switch
{$static on}
is set. There are no untyped class constants.
type
TCars = class(TVehicles)
private
public
wheelcount: integer: static;
end;
begin
TCars.wheelcount := 4;
(* further assignments are forbidden *)
end.
Weblinks
- “Static fields” in FPC-doc