var
sMonth,sDay : string;
sCurYear,sCurMonth,sCurDay,sCurWeek : Word;
begin
decodedate(Now,sCurYear,sCurMonth,sCurDay); GetMonthAndDay(sMonth,sDay,'5月2号'); //这个过程是从字符串中分离出数字
if (sDay=sCurDay) and (sMonth=sCurMonth) then //这样作行不通。
....
end;
sMonth,sDay : string;
sCurYear,sCurMonth,sCurDay,sCurWeek : Word;
begin
decodedate(Now,sCurYear,sCurMonth,sCurDay); GetMonthAndDay(sMonth,sDay,'5月2号'); //这个过程是从字符串中分离出数字
if (sDay=sCurDay) and (sMonth=sCurMonth) then //这样作行不通。
....
end;
====>
if (sDay=Pchar(sCurDay)) and (sMonth=Pchar(sCurMonth)) then
if (sDay=inttostr(sCurDay)) and (sMonth=inttostr(sCurMonth)) then
你的方法会出现地址错误
to : fengzhengren(风筝)
我就是用这个方法作的。
可能会是哪里的问题...
sCurDay:word;
sDay=sCurDay,这样行的通才怪 楼主肯定C学的不错,呵呵改成if strtoint(sday)=sCurDay then ...试试