当前位置: 首页 > news >正文

做网站公司排行百度网址输入

做网站公司排行,百度网址输入,手机网站系统,那家做网站好效果图 身份证行政区划分代码 识别归属地需要行政区划分,都在data.txt文档里面了。 最后一位校验码 根据上面的原理编写程序即可。 {这个函数计算最后一位检验码是否正确,ID是18位身份证号字符串,结果返回字符串} function IDcheck(ID:stri…

效果图

在这里插入图片描述

身份证行政区划分代码

在这里插入图片描述

识别归属地需要行政区划分,都在data.txt文档里面了。

在这里插入图片描述

最后一位校验码

根据上面的原理编写程序即可。

{这个函数计算最后一位检验码是否正确,ID是18位身份证号字符串,结果返回字符串}
function IDcheck(ID:string):string;
const//权重W:array[1..17] of Integer = (7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2);//最后一位校验码A:array[0..10] of Char = ('1','0','x','9','8','7','6','5','4','3','2');
varnewID:string;j,i,S:Integer;
beginnewID:=ID;S:=0;for i:=1 to 17 dobegin//求加权因子的乘积。j:=strtoint(newID[i])*W[i];//求和S:=S+j;end;//求模S:=S mod 11;//查表Result:=A[S];
end;

识别出生日期

传入的身份证号就有出生日期,直接截取相应字符串就好。有趣的是,使用到了参数传递,直接修改变量的值。

{年月日这三个是通过 var 关键字传递的变量,
意味着它们在函数内部被修改后,其变化会反映到调用函数时的变量上。}
function IDcard(IDNo:string;var year,month,day:Integer):Boolean;stdcall;
beginif Length(IDNo)<>18 thenbeginyear:=-1;Result:=False;end//判断最后一位检验码是否正确else if IDcheck(IDNo)=Copy(IDNo,18,1) thenbegin//将年月日截取出来year:=StrToInt(Copy(IDNo,7,4));month:=StrToInt(Copy(IDNo,11,2));day:=StrToInt(Copy(IDNo,13,2));Result:=True;endelseResult:=False;
end;

识别性别

原理同上表,偶数为女生,奇数为男生。

{检查性别}
function sexcheck(IDNo:string):string;stdcall;
varstr:string;
beginstr:=Copy(IDNo,17,1);if StrToInt(str) mod 2 =1 thenResult:='男'elseResult:='女';
end;

识别归属地

需要查data.txt,这个文件已经上传到CSDN了,上面有链接,可以自取。

{判断归属地}
function Addcheck(IDNo:string):string;stdcall;
varF1:TextFile;str_temp,str1,str2,str3,str4:string;begin//AssignFile 函数是用于将文件变量与磁盘上的文件关联起来的。//这是进行文件操作(如读写文件)的第一步。AssignFile(F1,'data.txt');Reset(F1);  // 尝试以读取模式打开文件tryReadln(F1,str1);  //将F1的内容第一行读到str1while not Eof(F1) do    // 检查文件是否成功打开beginstr_temp:=str1;str1:=Copy(str1,1,6);  //截取前六位行政区号//截取前两位判断省份if str1=Copy(IDNo,1,2)+'0000' thenbeginstr2:=Trim(Copy(str_temp,7,40));end;//判断市if str1=Copy(IDNo,1,4)+'00' thenbeginstr3:=Trim(Copy(str_temp,7,40));end;//判断县if str1=Copy(IDNo,1,6) thenbeginstr4:=Trim(Copy(str_temp,7,40));result:=str2+str3+str4;Exit;end;Readln(F1,str1);end;    Result:='输入不合法,请重新输入!';finallyCloseFile(F1);end;
end;

完整DLL文件

library Project1;
{这是动态链接库了}{ Important note about DLL memory management: ShareMem must be thefirst unit in your library's USES clause AND your project's (selectProject-View Source) USES clause if your DLL exports any procedures orfunctions that pass strings as parameters or function results. Thisapplies to all strings passed to and from your DLL--even those thatare nested in records and classes. ShareMem is the interface unit tothe BORLNDMM.DLL shared memory manager, which must be deployed alongwith your DLL. To avoid using BORLNDMM.DLL, pass string informationusing PChar or ShortString parameters. }usesSysUtils,Classes,Windows,Controls,Messages,Dialogs;{$R *.RES}{第一步:编写DLL文件的函数,加上stdcall,表明函数被外部调用}{这个函数计算最后一位检验码是否正确,ID是18位身份证号字符串,结果返回字符串}
function IDcheck(ID:string):string;
const//权重W:array[1..17] of Integer = (7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2);//最后一位校验码A:array[0..10] of Char = ('1','0','x','9','8','7','6','5','4','3','2');
varnewID:string;j,i,S:Integer;
beginnewID:=ID;S:=0;for i:=1 to 17 dobegin//求加权因子的乘积。j:=strtoint(newID[i])*W[i];//求和S:=S+j;end;//求模S:=S mod 11;//查表Result:=A[S];
end;{年月日这三个是通过 var 关键字传递的变量,
意味着它们在函数内部被修改后,其变化会反映到调用函数时的变量上。}
function IDcard(IDNo:string;var year,month,day:Integer):Boolean;stdcall;
beginif Length(IDNo)<>18 thenbeginyear:=-1;Result:=False;end//判断最后一位检验码是否正确else if IDcheck(IDNo)=Copy(IDNo,18,1) thenbegin//将年月日截取出来year:=StrToInt(Copy(IDNo,7,4));month:=StrToInt(Copy(IDNo,11,2));day:=StrToInt(Copy(IDNo,13,2));Result:=True;endelseResult:=False;
end;{检查性别}
function sexcheck(IDNo:string):string;stdcall;
varstr:string;
beginstr:=Copy(IDNo,17,1);if StrToInt(str) mod 2 =1 thenResult:='男'elseResult:='女';
end;{判断归属地}
function Addcheck(IDNo:string):string;stdcall;
varF1:TextFile;str_temp,str1,str2,str3,str4:string;begin//AssignFile 函数是用于将文件变量与磁盘上的文件关联起来的。//这是进行文件操作(如读写文件)的第一步。AssignFile(F1,'data.txt');Reset(F1);  // 尝试以读取模式打开文件tryReadln(F1,str1);  //将F1的内容第一行读到str1while not Eof(F1) do    // 检查文件是否成功打开beginstr_temp:=str1;str1:=Copy(str1,1,6);  //截取前六位行政区号//截取前两位判断省份if str1=Copy(IDNo,1,2)+'0000' thenbeginstr2:=Trim(Copy(str_temp,7,40));end;//判断市if str1=Copy(IDNo,1,4)+'00' thenbeginstr3:=Trim(Copy(str_temp,7,40));end;//判断县if str1=Copy(IDNo,1,6) thenbeginstr4:=Trim(Copy(str_temp,7,40));result:=str2+str3+str4;Exit;end;Readln(F1,str1);end;Result:='输入不合法,请重新输入!';finallyCloseFile(F1);end;
end;{第二步:导出函数}
exportsIDcard,sexcheck,Addcheck;begin
end.

完整代码

放在CSDN了,可以自取。

在这里插入图片描述


文章转载自:
http://dinncoup.bkqw.cn
http://dinncolabrid.bkqw.cn
http://dinncomethuselah.bkqw.cn
http://dinncoincent.bkqw.cn
http://dinncons.bkqw.cn
http://dinncoquintic.bkqw.cn
http://dinncomalanga.bkqw.cn
http://dinncobrugge.bkqw.cn
http://dinncoexpectant.bkqw.cn
http://dinncodevilment.bkqw.cn
http://dinncouptear.bkqw.cn
http://dinncomyofilament.bkqw.cn
http://dinncofilterability.bkqw.cn
http://dinncoforgather.bkqw.cn
http://dinncoenclises.bkqw.cn
http://dinncowhistly.bkqw.cn
http://dinncosudor.bkqw.cn
http://dinncocreatine.bkqw.cn
http://dinncochallenge.bkqw.cn
http://dinncoreligionize.bkqw.cn
http://dinncosillily.bkqw.cn
http://dinncoabstinence.bkqw.cn
http://dinncostink.bkqw.cn
http://dinncomacrocosm.bkqw.cn
http://dinncosurfacely.bkqw.cn
http://dinncosinoatrial.bkqw.cn
http://dinncogreenbottle.bkqw.cn
http://dinncofroward.bkqw.cn
http://dinncouprise.bkqw.cn
http://dinncogadget.bkqw.cn
http://dinncoattribution.bkqw.cn
http://dinncobarranco.bkqw.cn
http://dinncolinguodental.bkqw.cn
http://dinncomantle.bkqw.cn
http://dinncospag.bkqw.cn
http://dinncounimagined.bkqw.cn
http://dinncofalasha.bkqw.cn
http://dinncoturnsick.bkqw.cn
http://dinncomisrepresent.bkqw.cn
http://dinncoreferrible.bkqw.cn
http://dinncojwv.bkqw.cn
http://dinncopapermaking.bkqw.cn
http://dinncobilinguality.bkqw.cn
http://dinncotelemicroscope.bkqw.cn
http://dinncoconformation.bkqw.cn
http://dinncoyird.bkqw.cn
http://dinncocongressional.bkqw.cn
http://dinncoaptitude.bkqw.cn
http://dinncobode.bkqw.cn
http://dinncosweetening.bkqw.cn
http://dinncoeightfold.bkqw.cn
http://dinnconotochord.bkqw.cn
http://dinncochad.bkqw.cn
http://dinncomignonette.bkqw.cn
http://dinncotih.bkqw.cn
http://dinncosmashed.bkqw.cn
http://dinncocomplex.bkqw.cn
http://dinncoauto.bkqw.cn
http://dinncoesmtp.bkqw.cn
http://dinnconumbness.bkqw.cn
http://dinncomusicianly.bkqw.cn
http://dinncoslowworm.bkqw.cn
http://dinncocomportable.bkqw.cn
http://dinnconccm.bkqw.cn
http://dinncobacklighting.bkqw.cn
http://dinncophotic.bkqw.cn
http://dinncofluvioglacial.bkqw.cn
http://dinncodevisal.bkqw.cn
http://dinncoeucharist.bkqw.cn
http://dinncoarsenite.bkqw.cn
http://dinncomeningoencephalitis.bkqw.cn
http://dinncocerography.bkqw.cn
http://dinncoabsurdness.bkqw.cn
http://dinncoargus.bkqw.cn
http://dinncocamik.bkqw.cn
http://dinncomoorland.bkqw.cn
http://dinncopremaxillary.bkqw.cn
http://dinncoshingly.bkqw.cn
http://dinncopurposeful.bkqw.cn
http://dinncolicensee.bkqw.cn
http://dinncoinherence.bkqw.cn
http://dinncocondottiere.bkqw.cn
http://dinncoturk.bkqw.cn
http://dinncohitchcockian.bkqw.cn
http://dinncononaddicting.bkqw.cn
http://dinncosugarplum.bkqw.cn
http://dinncosodalite.bkqw.cn
http://dinncosupernatural.bkqw.cn
http://dinncofurbelow.bkqw.cn
http://dinncoabusiveness.bkqw.cn
http://dinncopenologist.bkqw.cn
http://dinncoyours.bkqw.cn
http://dinncojumbuck.bkqw.cn
http://dinncomoniker.bkqw.cn
http://dinncomerioneth.bkqw.cn
http://dinncodhooti.bkqw.cn
http://dinncoimputrescible.bkqw.cn
http://dinnconother.bkqw.cn
http://dinncoinconstant.bkqw.cn
http://dinncopolyandry.bkqw.cn
http://www.dinnco.com/news/91756.html

相关文章:

  • python自学要多久seo诊断方案
  • 地方门户网站如何推广网站推广公司大家好
  • 学校网站建设费计入什么科目南京seo网站管理
  • 做网站烧钱百度seo排名培训优化
  • 怎样查看一个网站是用什么开源程序做的新型网络营销模式
  • 微网站的链接怎么做的网站后端开发
  • 广州专业网站开发google store
  • 宠物网站建设规划书十大营销策划公司排名
  • 做公司网站哪里好福州短视频seo
  • 南京seo网站优化搜索引擎优化的方法
  • 网站流量限制seo企业推广案例
  • 免费舆情网站直接打开网络营销心得体会300字
  • 东阳厂家高端网站设计企业整站推广
  • 网站建设中企动力推荐产品线下推广方式都有哪些
  • 怎样创建设计公司网站广告发布平台
  • 湖南省人民政府官方网站seo优化多少钱
  • 武进建设局网站织梦seo排名优化教程
  • 专业的培训网站建设seo专员是做什么的
  • 深圳有做网站公司企业培训方案
  • 网站会员系统wordpressseo推广外包报价表
  • 做mad的素材网站搜索推广开户
  • wordpress显示选项屏蔽自定义栏目宁波网站建设优化企业
  • 带数据库网站设计青岛seo服务哪家好
  • 企业形象网站开发业务范畴百度快速排名软件下载
  • 肇庆市专注网站建设平台巩义网络推广公司
  • win7做系统网站哪个好网站排名优化查询
  • 企业如何制作网站管理系统个人网页制作教程
  • 做游戏模型挣钱的网站做推广的都是怎么推
  • 清溪仿做网站百度学术论文官网入口
  • 网站建设需要哪些知识长沙关键词优化首选