Hello,

If I define a private integer:

  TDemo = class(TCustomApplication)
  private
    i: integer;
    ...

and in a protected method I use it:
  for i := 0 to List.Count - 1 do
    ...

then I get an error:
  Error: Illegal counter variable


Moving it to method's var section helps.
Method's var section is also better place for it in general, but still it 
should be legal to use a private member as counter var.

Bug or feature?


Regards,
Juha Manninen
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to