Sign in Join

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

Mailing lists / fpc-pascal / 2014-03

procedure modifiers

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Xiangrong Fang

Hi All,

I wonder where should I put procedure modifiers, in the interface section, or implementation section, or both?

e.g.

interface
function test(data: Integer): Integer; inline; <-- here?
implementation
function test(data: Integer): Integer; inline; <-- here?
begin
  //......
end;

Thanks,
Xiangrong

Michael Van Canneyt
to Xiangrong Fang
Xiangrong Fang wrote 8 lines
Hi All, I wonder where should I put procedure modifiers, in the interface section, or implementation section, or both? e.g. interface function test(data: Integer): Integer; inline; <-- here?

Interface is the place where you should put them for sure. Some modifiers must be repeated in the implementation, others not (override, for one).

If I'm correct it also depends on the mode.
Delphi mode is more forgiving than ObjFPC mode.

In fact, it would be a good idea to document this. I will look into it.

Michael.