【发布时间】:2016-12-07 08:48:29
【问题描述】:
此代码在 Firemonkey Windows 应用程序中有效,但在 Android 应用程序中无效,我得到的是 Goodbye 而不是 Welcome,有什么问题?
Edit8 Text : 162496 //计算机唯一码
Edit9 Text : 1564224593 //serial #
procedure TForm2.Button5Click(Sender: TObject);
var
f2,f1:textfile;
i,j:byte;
s1,s2,s3,c:string;
F: TextFile;
begin
j:=0;
s2 := Edit8.Text;
for i:=1 to Length(s2) do
if (s2[i]>='0') and (s2[i]<='9') then
s3:=s3+s2[i];
for i:=1 to Length(s3)-1 do
if (edit9.Text[i*2-1]<>s3[i]) or (abs(strtoint(s3[i+1])-strtoint(s3[i]))<> strtoint(edit9.Text[i*2])) then
inc(j);
if j=0 then
ShowMessage('Welcome')
else
ShowMessage('Goodbye');
end;
【问题讨论】:
标签: android delphi delphi-10-seattle