The following code is compilable.
I'm using a private const with type defined and I can change it in the
constructor.

1. Is this by design?
2. Is there a way to declare attributes "final" like Java does?

=== begin ===
type
  TFoo = class
  private
    const INT: Integer = 0;
  public
    constructor Create;
  end;

implementation

constructor TFoo.Create;
begin
  INT := 9;
end;

end.
=== end ===

Best regards,
Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to