Sign in Join

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

Mailing lists / lazarus / 2000-03

Parameter and property names

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Florian Klaempfl
to Michael Van Canneyt: It shouldnow be possible to use a parameter with the same name as a property. So things…
Michael Van Canneyt wrote 15 lines
Hello, It shouldnow be possible to use a parameter with the same name as a property. So things like TComponent = Class(TPersistent) Procedure SetName(Name : String); Property Name : String Read FName write SetName; end; Should now work with the -Sd switch, for Delphi compatibility. Which doesn't mean that you should use it. It's still bad programming, IMHO, but can be used for porting Delphi code.

Ooops, this case doesn't work :(, I've to check it again, sorry.

Reply by email

Michael Van Canneyt

Hello,

It shouldnow be possible to use a parameter with the same name as a property.

So things like

  TComponent = Class(TPersistent)
    Procedure SetName(Name : String);
    Property Name : String Read FName write SetName;
  end;

Should now work with the -Sd switch, for Delphi compatibility. Which doesn't mean that you should use it.
It's still bad programming, IMHO, but can be used for porting Delphi code.

Michael.

Reply by email