Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-06

strict keyword or not ? (strict private )

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

martin

I just discovered that the following compiles (at least on trunc) (both delphi and objpas mode)

type
  TFoo = class
  strict private
    FBar: Integer;
  end;

However I found no mention on the docs?
http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refse30.html#x66-740006.1

Problem is:

while you can have global or local (in procedures) variables called "strict" (and also procedure/functions/methods of theis name) you get an error if you try to declare

type
  TFoo = class
  private
    strict : boolean;
  end;

That is somewhat inconsistent, if strict is allowed as an identifier name, then it should be allowed anywhere?

quick question: Which Fpc version was that added? (or did I simply miss it until now)

Thanks
Martin

Reply by email