In-depth method (5)-Result and function name

// Point 5: The return value of the function can use Result or the function name (but not recommended) 
function MyFun1 (x, y: Integer): Integer;
 begin 
  Result: = x + y;
 end ; 

function MyFun2 (x, y: Integer): Integer;
 begin 
  MyFun2: = x + y;
 end ;

 

Guess you like

Origin www.cnblogs.com/fansizhe/p/12729681.html