Label12.Caption:=trim(DataModule2.DemoCDS1.fieldbyname('Client_Integral').asstring);
if StrToInt(Label12.Caption)>2000 then
begin
repeat
StrToInt(Label12.Caption)-2000;
until
StrToInt(Label12.Caption)<2000;
end;如此这般代码??我想提的问题是:
DataModule2.DemoCDS1.fieldbyname('Client_Integral').asstring
返回值是一字符串!!我忘了函数了!!怎么判断它大于数字2000!!如果大于!!
把这个返回值减2000!!一直到这个数字小于2000??好象是 StrTo....
if StrToInt(Label12.Caption)>2000 then
begin
repeat
StrToInt(Label12.Caption)-2000;
until
StrToInt(Label12.Caption)<2000;
end;如此这般代码??我想提的问题是:
DataModule2.DemoCDS1.fieldbyname('Client_Integral').asstring
返回值是一字符串!!我忘了函数了!!怎么判断它大于数字2000!!如果大于!!
把这个返回值减2000!!一直到这个数字小于2000??好象是 StrTo....
begin
StrToInt(Label12.Caption)-2000;
end;
begin
Label12.Caption:=inttostr(StrToInt(Label12.Caption)-2000);
end;
再把Label12.Caption除2000怎么写???难道是
while StrToInt(Label12.Caption)>2000 do
begin
Label12.Caption:=inttostr(StrToInt(Label12.Caption)-2000);
end;inttostr(StrToInt(Label12.Caption)/2000)帮忙帮到底吧
begin
Label12.Caption:=inttostr(StrToInt(Label12.Caption)-2000);
end;edit2.text:=inttostr(StrToInt(Label12.Caption)/2000)