当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: functionFormat(constFormat:stri
 

 

 ·debugging activeforms    »显示摘要«
    摘要: in this short article, first published in uk-bug news, ill show a few tricks that will help us debug activeforms from within the delphi (or c++builder) ide itself. we start with a simple activeform......
 ·保存页面为mht的代码    »显示摘要«
    摘要: heres how to save a web page as a single file (mht format) using delphi code: uses cdo_tlb, adodb_tlb; ... procedure wb_saveas_mht(wb: twebbrowser; filename: tfilename); var msg: imess......


DELPHI 中的 Format 函数
function format(const format: string; const args: array of const): string; $[sysutils.pas

功能 返回按指定方式格式化一个数组常量的字符形式 【程序编程相关:发现Delphi 2005的几个小Bug

【推荐阅读:delphi7找不到TBDEClient

说明 这个函数是我在delphi中用得最多的函数,现在就列举几个例子给你个直观的理解 【扩展信息:Window画图程序中画曲线的简单实现

"%" [索引 ":"] ["-"] [宽度] ["." 摘要] 类型

format(x=%d, [12]);      //x=12 //最普通

format(x=%3d, [12]);     //x= 12 //指定宽度

format(x=%f, [12.0]);     //x=12.00 //浮点数

format(x=%.3f, [12.0]);    //x=12.000 //指定小数

format(x=%8.2f[12.0])     //  x=     12.00 ;

format(x=%.*f, [5, 12.0]); //x=12.00000 //动态配置

format(x=%.5d, [12]);     //x=00012 //前面补充0

format(x=%.5x, [12]);      //x=0000c //十六进制

format(x=%1:d%0:d, [12, 13]); //x=1312 //使用索引


...   下一页
 ·我用delphi实现的singleton模式    »显示摘要«
    摘要: unit usingleton; interface uses sysutils; type esingletonexception = class(exception); tsingleton = class private // 单例类真正使用的构造函数,此处命名为createnew constructor createnew; public // 用于阻止显式调用,因为即便将其设......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE