11位得号码给出前几位(最少给出7位)后自动生生成11位得号码,例如
起始:1321138**** 结束1321139****;
起始:12133667*** 结束121336678**……怎么自动生成并保存下来呢,最好给出代码
起始:1321138**** 结束1321139****;
起始:12133667*** 结束121336678**……怎么自动生成并保存下来呢,最好给出代码
解决方案 »
- delphi 类似qq聊天界面中链接方式的实现
- FastReport中打印高亮某个字符
- 很怪很怪的很小很小的问题。
- interface中的var与TYPE里的PUBLIC里面定义的变量有何区别.
- 我不想看书!!!
- 初学,请问LoadFromfile运行的条件是什么?
- 开心一笑!!(斑竹手下留情)
- 怎樣將Delphi編寫的應用程序做成安裝文件﹖萬分著急﹗﹗謝﹗﹗﹗﹗﹗
- 如何让DBGRID中的某列得不到焦点?
- 有谁知道delphi中如何返回得到网页post各种参数后的页面或者网页源代码?
- 关于在delphi中调用vb编写的dll的问题,谢过先,在线等待
- dbexpress如何在代码里指定连哪个数据库?
var
s1,s2:string;
Next:Int64;
i:Integer;
begin
s1:=IntToStr(First);
s2:=IntToStr(Last);
for i:=1 to 11-Length(s1) do
First:=First*10;
for i:=1 to 11-Length(s2) do
Last:=Last*10+9;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i,First,Last:Int64;
begin
First:=1321138;
Last:=1321139;
GenNum(First,Last);//根据给定值获得第一个数和最后一个数
ShowMessage(Inttostr(First)+' '+Inttostr(last));
for i:=First to Last do
begin
//记录 i
end;
end;
var
flag:double;
clickflag:integer;
然后给中间变量付值
flag:=0;
在ButtonClick中输入以下代码就行了:
if clickflag=0 then
begin
flag:= strtofloat(edit1.Text)*10000;
edit3.Text:=floattostr(flag+1);
edit1.Text:=floattostr(flag);
clickflag:=1;
end
else
begin
if (length(edit1.Text)<7 ) or (length(edit1.Text)>11) then
begin
application.MessageBox('号段长度不对','注意',mb_ok);
end
else
begin
if strtofloat(edit3.Text)>=strtofloat(edit2.Text) then
begin
application.MessageBox('已超出该号段','注意',mb_ok);
end
else
begin
edit3.Text:=floattostr(strtofloat(edit3.Text)+1);
end
end
end ;