/* $Id$
$State$
$Log$
+ Revision 1.309 2021/05/20 12:39:14 brouard
+ Summary: Version 0.99r24
+
Revision 1.308 2021/03/31 13:11:57 brouard
Summary: Version 0.99r23
{
/* cuts string in into blocc and alocc where blocc ends before FIRST occurence of char 'occ'
and alocc starts after first occurence of char 'occ' : ex cutv(blocc,alocc,"abcdef2ghi2j",'2')
- gives blocc="abcdef" and alocc="ghi2j".
+ gives alocc="abcdef" and blocc="ghi2j".
If occ is not found blocc is null and alocc is equal to in. Returns blocc
*/
char *s, *t;
return (0);
}
if( j != cptcovs ){ /* Be careful if a variable is in a product but not single */
- printf("ERROR: the number of variable in the resultline, %d, differs from the number of variable used in the model line, %d.\n",j, cptcovs);
- fprintf(ficlog,"ERROR: the number of variable in the resultline, %d, differs from the number of variable used in the model line, %d.\n",j, cptcovs);
+ printf("ERROR: the number of variables in the resultline, %d, differs from the number of variables used in the model line, %d.\n",j, cptcovs);
+ fprintf(ficlog,"ERROR: the number of variables in the resultline, %d, differs from the number of variables used in the model line, %d.\n",j, cptcovs);
}
for(k=1; k<=j;k++){ /* Loop on any covariate of the result line */
if(nbocc(resultsav,'=') >1){
cutl(stra,strb,resultsav,' '); /* keeps in strb after the first ' '
- resultsav= V4=1 V5=25.1 V3=0 strb=V3=0 stra= V4=1 V5=25.1 */
+ resultsav= V4=1 V5=25.1 V3=0 stra= V5=25.1 V3=0 strb= V4=1 */
cutl(strc,strd,strb,'='); /* strb:V4=1 strc=1 strd=V4 */
}else
cutl(strc,strd,resultsav,'=');
}
}
if(match == 0){
- printf("Error in result line: %d value missing; result: %s, model=%s\n",k1, resultline, model);
+ printf("Error in result line: V%d is missing in result: %s according to model=%s\n",k1, resultline, model);
+ fprintf(ficlog,"Error in result line: V%d is missing in result: %s according to model=%s\n",k1, resultline, model);
+ return 1;
}
}
}
}
if(match == 0){
printf("Error in result line: %d value missing; result: %s, model=%s\n",k1, resultline, model);
+ fprintf(ficlog,"Error in result line: %d value missing; result: %s, model=%s\n",k1, resultline, model);
+ return 1;
}else if(match > 1){
printf("Error in result line: %d doubled; result: %s, model=%s\n",k2, resultline, model);
+ fprintf(ficlog,"Error in result line: %d doubled; result: %s, model=%s\n",k2, resultline, model);
+ return 1;
}
}
fprintf(ficlog,"ERROR: Current version of IMaCh limits the number of resultlines to %d, you used %d\nYou can use the 'r' parameter file '%s' which uses option mle=0 to get other results. ",MAXRESULTLINES,nresult,rfileres);
goto end;
}
- decoderesult(resultline, nresult); /* Fills TKresult[nresult] combination and Tresult[nresult][k4+1] combination values */
+ if(!decoderesult(resultline, nresult)){ /* Fills TKresult[nresult] combination and Tresult[nresult][k4+1] combination values */
fprintf(ficparo,"result: %s\n",resultline);
fprintf(ficres,"result: %s\n",resultline);
fprintf(ficlog,"result: %s\n",resultline);
+ } else
+ goto end;
break;
case 14:
printf("Error: Unknown command '%s'\n",line);