算法计算段不连续可计算

This commit is contained in:
zhaolei 2026-05-24 16:52:47 +08:00
parent 3818e80601
commit 0b91d6c5aa

View File

@ -583,23 +583,23 @@ int CMemRdWt::Const()
strncpy(buf,pp,k-i);
buf[k-i]='\0';
if(j==0) {
if(Sdep&&(float)atof(buf)!=Edep) {
char temm[200],temm1[200];
temm1[0]=0;
int t=strchr(pp,0x0d)-pp;
if(t>0) {
strncpy(temm1,pp,t);
temm1[t]=0;
}
sprintf(temm,"深度段%s与前一段%g-%g不连续",temm1,Sdep,Edep);
if(SlfError){
strcpy(SlfError->ErrorStr,temm);
SlfError->ErrorNo=-1;
}
if(!isfirstrun){
mes.append(temm);
}
}
// if(Sdep&&(float)atof(buf)!=Edep) {
// char temm[200],temm1[200];
// temm1[0]=0;
// int t=strchr(pp,0x0d)-pp;
// if(t>0) {
// strncpy(temm1,pp,t);
// temm1[t]=0;
// }
// sprintf(temm,"深度段%s与前一段%g-%g不连续",temm1,Sdep,Edep);
// if(SlfError){
// strcpy(SlfError->ErrorStr,temm);
// SlfError->ErrorNo=-1;
// }
// if(!isfirstrun){
// mes.append(temm);
// }
// }
Sdep=(float)atof(buf);
if(Sdep<HD->Stdep)HD->Stdep=Sdep;
j++;