Delphi函数大全

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Delphi函数大全

首部function Languages: TLanguages; $[

功能返回系统语言对象

说明通过此函数可以得到系统的语言环境

参考type

例子

12a12c12a12c.

参考

例子:= IsValidIdent;

━━━━━━━━━━━━━━━━━━━━━

首部function IntToStr(Value: Integer): string; overload; $[

首部function IntToStr(Value: Int64): string; overload; $[

功能返回整数Value转换成字符串

说明Format('%d', [Value])

参考function

例子:= IntToStr;

━━━━━━━━━━━━━━━━━━━━━

首部function IntToHex(V alue: Integer; Digits: Integer): string; overload; $[

首部function IntToHex(V alue: Int64; Digits: Integer): string; overload; $[

功能返回整数Value转换成十六进制表现结果;Format('%.*x', [Digits, Value]) 说明参数Digits指定字符最小宽度;最小宽度不足时将用0填充

参考function

例子:= IntToHex, ;

━━━━━━━━━━━━━━━━━━━━━

首部function StrToInt(const S: string): Integer; $[

功能返回字符串S转换成整数

说明字符串非整数表达时将引起异常

参考procedure

例子:= StrToInt;

━━━━━━━━━━━━━━━━━━━━━

首部function StrToIntDef(const S: string; Default: Integer): Integer; $[

功能返回字符串S转换成整数

说明字符串非整数表达时则返回默认值Default

参考procedure

例子:= StrToIntDef, 0);

━━━━━━━━━━━━━━━━━━━━━

首部function TryStrToInt(const S: string; out Value: Integer): Boolean; $[

功能返回字符串S转换成整数V alue是否成功

说明字符串非整数表达时返回False并且Value将输出为0

参考procedure

例子

..);打开失败则返回负数

参考function

例子

xe'

参考function ;function

例子:= ExtractFileExt;

━━━━━━━━━━━━━━━━━━━━━

首部function ExpandFileName(const FileName: string): string; $[

功能返回文件名的完整表示

说明ExpandFileName('')='C:\Program Files\Borland\Delphi6\Projects\'

参考function

例子:= ExpandFileName;

━━━━━━━━━━━━━━━━━━━━━

首部function ExpandFileNameCase(const FileName: string; out MatchFound: TFilenameCaseMatch): string; $[

功能分情况返回文件名的完整表示

说明type TFilenameCaseMatch = (mkNone, mkExactMatch, mkSingleMatch, mkAmbiguous); 参考function ;function ;function

例子

.;获取失败则返回-1

参考function

例子:= DiskFree;

━━━━━━━━━━━━━━━━━━━━━

首部function DiskSize(Drive: Byte): Int64; $[

功能返回驱动器全部空间

说明参数Drive为0表示当前路径,为1表示=A驱,为2表示=B驱...;获取失败则返回-1

参考function

例子:= DiskSize;

━━━━━━━━━━━━━━━━━━━━━

首部function FileDateToDateTime(FileDate: Integer): TDateTime; $[

功能返回将文件日期时间类型转换日期时间类型

说明FileDate非法是将触发异常

参考function ;function

例子<参见FileAge>

━━━━━━━━━━━━━━━━━━━━━

首部function DateTimeToFileDate(DateTime: TDateTime): Integer; $[

功能返回将日期时间类型转换文件日期时间类型

说明年份在1980到2107之外则返回0

参考function ;function

例子<参见FileSetDate>

━━━━━━━━━━━━━━━━━━━━━

首部function GetCurrentDir: string; $[

功能返回当前操作目录

说明[注意]调用文件对话框会改变当前操作目录

参考function

例子:= GetCurrentDir;

相关文档
最新文档