In-depth method (7)-Result

// Point 7: Not only that, Result also has a more flexible 
function MyFun (b: Byte): Char;
 begin 
  // Result: = Char (b); {Of course we can write like this} 
  Byte (Result): = b ;    { This is OK } 
end ; 

{ There is such a function in System } 
function TObject.ClassType: TClass;
 begin 
  Pointer (Result): = PPointer (Self) ^;
 end ;

 

Guess you like

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