API Index
专业术语
Delphi - Delphi 百科
PASCAL - PASCAL 百科
Object PASCAL - Object PASCAL 百科
系统PASCAL方法WIKI参考
FileCopy
//- This function will copy files.
DeleteFile
//- This function will delete files.
ListFilesInDirectory
//- This function return a list (TStringList) of files in specified folder.
删除文件夹下所有文件,清空文件夹
var
FileList : TStringList;
filesfrom, filepath : string;
ISEMPTY, i : integer;
begin
filesfrom:= ReqList.Values['DocPath'];
FileList:= TStringList.Create;
try
ListFilesInDirectory(filesfrom, '*.*', false, FileList);
ISEMPTY:= FileList.Count;
if ISEMPTY > 0 then
for i:= 0 to FileList.Count - 1 do begin
filepath:= FileList.Strings[i];
DeleteFile(filepath);
end;
finally
FileList.free;
end;
Object Pascal语言参考
//包含字符, indexOf
//Pos 函数 在字符串中搜索子串
if POS('软','软件工具')>0 then 1
// ExecuteCompiledScript( Reqlist.values['Stingray_Phys_Path'] + 'StingrayRules PostQR_Entry', FSQLConnection, ReqList, FTrnMan )
// ExecuteCompiledScript( ReqList.Values['prefile'], FSQLConnection, ReqList, FTrnMan );
if ReqList.Values['NBRESULT']='1' THEN ReqList.Values['__NBRESULT']:='1';
// Upload_FilePath:= ReqList.Values['Upload_FilePath'];
Srv_Img_Path:= ReqList.Values['Srv_Img_Path'] + ExtractFileName(Upload_FilePath);
FileCopy( Upload_FilePath, Srv_Img_Path, True );
// ExecuteCompiledScript( Reqlist.values['Stingray_Phys_Path'] + 'StingrayRules PostQR_Entry', FSQLConnection, ReqList, FTrnMan )
//GetConstant
ReqList.Values['Not_Sufficient_Right '] := GetConstant('Global ', 'Not_Sufficient_Right ');
ReqList.Values['OldtoNewACrID_ '+ReqList.Values['ACraftID ']] := ReqList.Values['NEWACRID '];
ReqList.Values['NEWAirCraftID '] := ReqList.Values['OldtoNewACrID_ '+ReqList.Values['aPQA_ID ']];
Reqlist.values['TheSaveString '] := ReplaceString(Reqlist.values['TheSaveString '],' * * ','''', false);
UpdateWrittenPremium( StrToIntDef(ReqList.Values['sLOB_ID '], 1), ReqList.Values['PolicyCode '], FSQLConnection );
UpdateWrittenPremiumLevel( StrToIntDef(ReqList.Values['sFRM_D '],1) , ReqList.Values['PolicyCode '], FSQLConnection );
// EdtResult.Text := Copy(EdtResult.Text, 1, Length(EdtResult.Text)-1);
ReqList.Values['sqlarrstr '] :=Copy(ReqList.Values['sqlarrstr '],1,Length(ReqList.Values['sqlarrstr '])-1);
// if trim(uppercase(Reqlist.values['sSSR_CompareType '])) = 'INTEGER ' then
begin if ProcessExpression(Reqlist.values[Reqlist.values['sSSR_FieldName ']] + Reqlist.values['sSSR_Operator '] + Reqlist.values['sSSR_StopValue ']) then
Reqlist.values['AddSeRR ']:= '1 ' else Reqlist.values['AddSeRR ']:= '0 ';
// var NewFile, NewFileName: String;
begin NewFile:= CreateReport(Reqlist.values['sREP_ID'], 'PDF', ReqList, FSqlConnection);
Reqlist.values['Response_Content']:= NewFile;
//
----------------------------------------------------=----------------------- PASCAL
类型转换函数
DateTimeToFileDate
DateTimeToStr
DateTimeToString
DateToStr
FileDateToDateTime
FloatToDecimal
FloatToStrF
FloatToStr
FloatToText
FloatToTextFmt
IntToHex
IntToStr
StringToWideChar
StrToDate
StrToDateTime
StrToFloat
StrToInt
StrToIntDef
StrToFloatDef
StrToTime
TextToFloat
TimeToStr
VarToDateTime
WideCharLenToString
WideCharToString
WideCharToStrVar