Jonas Maebe wrote: > unit tt; > > interface > > {$Inline on} > type > TForm1 = class > private > procedure DebugInfo; inline; > public > procedure DoSomething; > end; > > Implementation > > procedure TForm1.DebugInfo; > begin > {$ifdef debug} > DebugInfo > {$endif} > end; > > procedure TForm1.DoSomething; > begin > DebugInfo; > end; > > end.
While on the subject of inline: I always wondered (currently using fpc 2.2.4 on W32 and GNU/Linux) why one can have inline hints either just in the interface (as in the ex. above), or the implementation, or both. This seems to be the case both for class methods and single functions/procedures. I haven't checked under which conditions the compiler actually inlines the code, though. Is that an intended behavior? If so, why? Regards Roland _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal