On Friday 22 November 2013 19:19:10 August Oktobar wrote:
> What about returning by var?
>
> function f(t: T):var T; or function f(t: T):out T; or function f(t:
> T):T;var;
>
> in delphi you must return record by pointer or var/out parameter to avoid
> copying
>
With the proposed assignment at end of the function the compiler maybe could 
optimize an assignment to write directly to the left side of assignment.
"
sub func1(): bigobjectty;
begin
 := BIGOBJECT;
end;
...
var
 b1: bigobjectty;
...

 b1:= func1(); //no intermediate variable
"

Martin

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to