[转载]Delphi 2009 (Tiburon) 新特性之 Exit 函数的新用法
下面的两个函数起到的作用是一样的 ![[转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法 [转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![[转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法 [转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![[转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法 [转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![[转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法 [转载]Delphi <wbr>2009 <wbr>(Tiburon) <wbr>新特性之 <wbr>Exit <wbr>函数的新用法](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
function DoSomething(aInteger: integer): string;
begin
if aInteger < 0 then
begin
Exit('Negative');
end;
Result := 'Positive';
end;
function DoSomething(aInteger: integer): string;
begin
if aInteger < 0 then
begin
Result := 'Negative';
Exit;
end;
Result := 'Positive';
end;
文章出处:http://blogs.codegear.com/nickhodges/2008/07/22/39079