function TFMPdel.FindFilesName(StrFilesName:string):boolean;
var Rec:TSearchRec;
Done:Integer;
StrHead:string;
begin
StrHead:='i';
Done:=FindFirst('E:\_libsrc\del\*.dat',faAnyFile,Rec);
While Done=0 do
begin
StrFilesName:=Rec.Name;
Done:=FindNext(Rec);
end;
FindClose(Rec);
StrFilesName:=Copy(StrFilesName,1,1);
if (StrFilesName=StrHead) then
Result:=true;
end;function CheckString(StrIn:string;index:integer;var temp:boolean):string;
var StrinCopy:string;
begin
temp:=true;
if index=8 then
if strIn='000000' then
temp:=false;
if index=11 then
StrinCopy:=Copy(strIn,1,8);
if StrinCopy='00000000' then
temp:=false;
if index=14 then
begin
if FindFilesName(StrFilesName) then
strIn:='I';
temp:=true;
end;
StrIn:=trim(StrIn);
if (index=6) or (index=7) or (index=13) then
strIn:=strIn+' ';
StrIn:='"'+StrIn+'"';
Result:=StrIn;
end;编译报错:[Error] UPdel.pas(100): Undeclared identifier: 'FindFilesName'
为什么啊~?
var Rec:TSearchRec;
Done:Integer;
StrHead:string;
begin
StrHead:='i';
Done:=FindFirst('E:\_libsrc\del\*.dat',faAnyFile,Rec);
While Done=0 do
begin
StrFilesName:=Rec.Name;
Done:=FindNext(Rec);
end;
FindClose(Rec);
StrFilesName:=Copy(StrFilesName,1,1);
if (StrFilesName=StrHead) then
Result:=true;
end;function CheckString(StrIn:string;index:integer;var temp:boolean):string;
var StrinCopy:string;
begin
temp:=true;
if index=8 then
if strIn='000000' then
temp:=false;
if index=11 then
StrinCopy:=Copy(strIn,1,8);
if StrinCopy='00000000' then
temp:=false;
if index=14 then
begin
if FindFilesName(StrFilesName) then
strIn:='I';
temp:=true;
end;
StrIn:=trim(StrIn);
if (index=6) or (index=7) or (index=13) then
strIn:=strIn+' ';
StrIn:='"'+StrIn+'"';
Result:=StrIn;
end;编译报错:[Error] UPdel.pas(100): Undeclared identifier: 'FindFilesName'
为什么啊~?
解决方案 »
- 一個GroupBox里面有10個CheckBox.怎麼樣得到所有的CheckBox的Caption?:
- 大家看看这段代码应该怎么改?
- 请大家推荐几本delphi进阶的书
- 為什麼我的視圖 view 數據集 無法修改?
- 这样的功能是怎么实现的?
- 如何设计这个软件比较好?
- 存儲過程的問題, 望大家拔刀相助亞, 救命亞!!!!!!!
- ===傻傻的问一个关于制作CHM帮助的问题===
- 这两天我在做一个文件加密的程序,但是再读取文件的时候不知道为什么会那么慢?
- 如何把字符串”2002年8月14日”转换为短日期格式的“2002-8-14”
- 都说能力最重要,我不考证,找不到工作,怎么提高我的能力????
- 在线等,在DBGRID里几个字段值相加减计算!
function CheckString(StrIn:string;index:integer;var temp:boolean):string;
不在同一个类中的原因
你可以把checkstring函数加到TFMPdel类中
改为:
function FindFilesName(StrFilesName:string):boolean;