为什么我的问题没有人回答????
Function TFrmSetCard.ZipCard(cCard:string;iKey:Double):string;
var intLong,iChar:integer;
strChar,intPassword:string;
begin
intLong := Length(cCard);
strChar := cCard;
For ichar := 1 to intLong do
begin
strChar := Leftstr(strChar,1);
if length(intPassword) > 9 then
intPassword := intPassword + inttostr(ord(strChar)*iChar)//这儿有问题
else intPassword := intPassword + inttostr(ord(strChar)) + inttostr(iChar);//这儿有问题
end;
strChar := Rightstr(cCard,Length(cCard)- iChar);
ZipCard := intPassword;
end;
//¸ÄдÃÜÂë
Function TFrmSetCard.ZipPassword(strValue:string):string;
var intLong,iChar:integer;
strChar :string;
intPassword:integer;
begin
intLong := length(strValue);
strChar := strValue;
For iChar := 1 to intLong do
begin
strChar := Leftstr(strChar,1);
intPassword := intPassword + Ord(strChar) - iChar;//这儿有问题
strChar := Rightstr(strValue,Length(strValue) - iChar);
end;
ZipPassword := inttostr(intPassword);
end;