![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Delphi
cncqly
这个作者很懒,什么都没留下…
展开
-
取得命令行的输出结果
procedure CheckResult(b: Boolean);begin if not b then raise Exception.Create(SysErrorMessage(GetLastError));end;function RunDOS(const CommandLine: string): string;var HRead, HWrite: THand...转载 2019-03-08 19:58:22 · 665 阅读 · 0 评论 -
GetLocaleInfo获取信息
function mGetLanguage:string;var mBuf: array[0..255] of char;begin GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_ILANGUAGE,mBuf,256); Result:=StrPas(mBuf);end;使用示例:ShowMessage(mGetLanguage)...原创 2019-03-08 20:22:58 · 3144 阅读 · 0 评论 -
delphi 用 GetEnvironmentVariable 获取常用系统环境变量
用 GetEnvironmentVariable 获取系统变量来得快.--------------------------------------------------------------------------------//譬如 %WINDIR% 是表示系统目录的系统变量, 可以这样获取:vars: string;begins := GetEnvironmentVariabl...转载 2019-03-09 20:55:49 · 1220 阅读 · 0 评论 -
Delphi中exit、break、continue等跳出操作的区别
Delphi中表示跳出的有break,continue,abort,exit,halt,runerror等1.break 强制退出最近的一层循环(注意:只能放在循环里;而且是只能跳出最近的一层循环),用于从for、while、repeat语句中强制退出 类似于C/C++等语言中的break的功能2.continue 用于从for、while、repeat语句中结束循...转载 2019-03-09 21:31:46 · 1803 阅读 · 0 评论 -
Delphi 过程与函数
原文地址delphi 过程以保留字procedure开始,没有返回值;函数以保留字function开始,有返回值。过程参数位于括号里面,多个参数之间以分号分隔,例如:procedure SetDate(Year: Integer; Month: Integer; Day: Integer);也可以将相同类型的参数组合在一起,则上述过程标题写成:procedure SetDate...转载 2019-03-08 12:56:25 · 583 阅读 · 0 评论