关键字提取_Fortran实现文件中关键字提取

本文介绍了使用Fortran语言实现文件中关键字提取的方法。程序包括主程序定义、子函数调用,通过比较输入文本和文件内容,定位并识别关键字,便于对相关信息进行处理,如自动修改参数数值进行迭代求解。
摘要由CSDN通过智能技术生成

本文采用Fortran语言,实现文件中关键字的识别

----------------------------------------------

程序源代码

program check_Itemimplicit none            integer::i,j,k,str_len,str_len_in,check_num        integer::countnum        logical::alive        character*400 temp,in_temp,stopexe        character*400 file_path,file_name        integer,External::GetFileNum,GetFileNum_blank        file_path="C:\001-document\007_MyCodeForWeChat\2CheckItem"        file_name="\Data.csv"        stopexe="999"        stopexe=trim(stopexe)write(*,*)write(*,*) "***\\\  Comparing Item"write(*,*) "***\\\  From ZhaoZe"write(*,*)write(*,*) "***---  Data is From"write(*,*) "***---  ",trim(file_path)write(*,*) "***---  ",trim(file_name)write(*,*)write(*,*)  do k=1,100    !open(7,file=file_name)    open(7,file=trim(file_path)//trim(file_name))    inquire(file=trim(file_path)//trim(file_name),exist=alive)    if (alive) then        write(*,*) "input the check name--(""999"" stop the running exe)"        read(*,*) in_temp        if (trim(in_temp)/=stopexe) then            str_len_in=LEN(trim(in_temp))            call Character_change(in_temp)              countnum=GetFileNum_blank(7)            write(*,*) countnum            check_num=0            
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值