I just saw the 'inline' reserved work... It's weird, I code in Delphi
since 1997 and I never got in toutch with that. This is a discovery
for me! :)
So if I declare:
function Max(const a, b: Integer): Integer; inline;
begin
if a > b then
Result := a
else
Result := b;
end;
Does that mean that the actual code of the function will be inserted
inline where it has been called; so not making a call on the stack,
but rather insert the code?
procedure CallingProc;
begin
Max(1, 2);
end;
Will actually give the "following" once compiled:
procedure CallingProc;
begin
if a > b then
Result := a
else
Result := b;
end;
Regards.
--
Alexandre Leclerc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives