网上文摘 小说 Flash游戏 最近更新 下载排行 资源分类 下载指南
经典编程资源 精彩不容错过
设为首页
加入收藏
联系我们
当前位置:Delphi园地技巧文章宝兰动态 → Delphi2009增强之Exit函数
Delphi2009增强之Exit函数
日期:2009年1月9日 作者: 人气: 查看:[大字体 中字体 小字体]
In Tiburon, the following two functions do exactly the same thing:
在Delphi2009(Tiburon)中,以下两个函数做相同的事情:

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://www.qfly.cn 翻译,

原文参考了:http://blogs.codegear.com/nickhodges/2008/07/22/39079

(出处:http://www.jycrop.com/read.php/151.htm)

相关文章:
·Delphi2008销声匿迹,Delphi2009惊现江湖!
·Delphi 2009(Tiburon)中一些VCL组件的增强
·Delphi 2009
·Delphi 2009/C++ Builder 2009(Tiburon)如期发布!
·Delphi2009初体验 - IDE篇 - D2009 VS VS2005
·Delphi2009/C++Builder2009新特性
·Delphi2009感想
·淺談如何使用Delphi 2009的泛型容器類別
·Delphi2009 Update 2放出!
 → 特别推荐
 → 热点TOP10
关于我们 | 广告服务 | 发布资源 | 联系站长 Copyright © 2001-2009 Delphi园地 All Rights Reserved