globalunit.pas
来自「用delphi+intraweb写的简单报表系统(activeform使用技术)」· PAS 代码 · 共 66 行
PAS
66 行
unit GlobalUnit;
interface
uses SysUtils, Classes;
function FormatDate(ADate: TDateTime; sFormat: string = 'yyyy-mm-dd'): string;
procedure AddLog(vList: TStrings; vPath, vFile: string);
function ReadFileNameText(vPath, vSection, vKey: string): string;
function IIF(Condition: Boolean; V1, V2: Integer): Integer; overload;
function IIF(Condition: Boolean; V1, V2: string): string; overload;
function SPACE(N: Integer): string;
function ALLTRIM(S: string): string;
procedure LoadHtml(vPath, vSection, vKey: string; vList: TStrings);
implementation
function IIF(Condition: Boolean; V1, V2: Integer): Integer; overload;
begin
if (Condition) then Result := V1 else Result := V2;
end;
function IIF(Condition: Boolean; V1, V2: string): string; overload;
begin
if (Condition) then Result := V1 else Result := V2;
end;
function SPACE(N: Integer): string;
var i: Integer;
begin
Result := '';
for i := 1 to N do
Result := Result + ' ';
end;
function ALLTRIM(S: string): string;
begin
Result := TrimLeft(TrimRight(S));
end;
//---------------------------------------------------------------------------
//格式化日期
function FormatDate(ADate: TDateTime; sFormat: string = 'yyyy-mm-dd'): string;
begin
Result := FormatDateTime(sFormat, ADate);
end;
procedure AddLog(vList: TStrings; vPath, vFile: string);
begin
end;
function ReadFileNameText(vPath, vSection, vKey: string): string;
begin
result:='';
end;
procedure LoadHtml(vPath, vSection, vKey: string; vList: TStrings);
begin
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?