摘要:
function ARoundN(v: Double; n: Integer): Double; var I:Integer; begin result:=v; for I:=0 to n-1 do begin result:=result*10; end; result:=Round(result); for I:=0 to n-1 do ... 阅读全文
2018年2月15日
摘要:
function TrimAnsi(const S: AnsiString): Ansistring; var I, L: Integer; begin L := Length(S); I := 1; while (I L then Result := '' else begin while S[L] 0) and (S[I] <= ' ') do Dec(I);... 阅读全文
摘要:
CopyFileProgressBar(pwidechar(ListBox1.Items.Strings[I]),pwidechar(NewDir+'\'+ExtractFileName(ListBox1.Items.Strings[I]))); procedure CopyFileProgressBar(getPath,setPath:string); var getStrea... 阅读全文
摘要:
uses math; function GenID:String; var b, x: byte; begin Result := '{'; Randomize; for b:= 1 to 8 do begin if Random(100) > 50 then Result := Result + chr(RandomRange(48,57)) else Res... 阅读全文
摘要:
function IsIPAdress(const Value:String):Boolean; var n,x,i: Integer; Posi:Array[1..4]of Integer; Oktet:Array[1..4]of String; begin Result := true; x := 0; // es dürfen nur Zahlen und P... 阅读全文
摘要:
function ValidateName(n: string): string; var banned, res: string; i,j: integer; begin res:= n; banned:= '\/:*?"|'; for i:= 1 to Length(res) do for j:= 1 to Length(banned) do if res[i... 阅读全文
摘要:
unit YzDelphiFunc; interface uses ComCtrls, Forms, Windows, Classes, SysUtils, ComObj, ActiveX, ShlObj, Messages, Graphics, Registry, Dialogs, Controls, uProcess, uCpuUsage, StrUtils, CommCtrl,... 阅读全文
摘要:
http://www.delphitop.com/html/hanshu/104.html Delphi中break,exit,abort跳出循环的比较exit: 退出函数体abort: 遇到异常,安静处理,就是不显示不提示break: 退出当前循环体,包括for ,while, repeat等循环 阅读全文