diff options
author | jofret | 2010-06-21 07:19:27 +0000 |
---|---|---|
committer | jofret | 2010-06-21 07:19:27 +0000 |
commit | 6d7c1d87455053bb11082198f747eb9445f59675 (patch) | |
tree | 78dd24dbab90140633ee33850990d6abf6d9e9ea /macros/FunctionAnnotation/FA_GetFunAnn.sci | |
parent | 7a35f83fa20927d71dd1b1f792dea35c7e9d5f47 (diff) | |
download | scilab2c-6d7c1d87455053bb11082198f747eb9445f59675.tar.gz scilab2c-6d7c1d87455053bb11082198f747eb9445f59675.tar.bz2 scilab2c-6d7c1d87455053bb11082198f747eb9445f59675.zip |
Hypermatrix management : detect variables with more than 2 dimensions
Diffstat (limited to 'macros/FunctionAnnotation/FA_GetFunAnn.sci')
-rw-r--r-- | macros/FunctionAnnotation/FA_GetFunAnn.sci | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.sci b/macros/FunctionAnnotation/FA_GetFunAnn.sci index b3d842ab..98956785 100644 --- a/macros/FunctionAnnotation/FA_GetFunAnn.sci +++ b/macros/FunctionAnnotation/FA_GetFunAnn.sci @@ -159,42 +159,28 @@ else // #RNU_RES_B
// --- Read the Fun size annotation. ---
// #RNU_RES_E
- SCI2C_nelem = 1; // Useful for eval.
- line_position = line_position + 1;
- if (isempty(check_string) == %F)
- tmpannstring = eval(SharedInfo.Annotations.FUNSIZE);
- check_string = stripblanks(mgetl(inclsfid,1));
- if (SCI2Cstrncmps1size(tmpannstring,check_string))
+ SCI2C_nelem = 0; // Useful for eval.
+ while(SCI2C_nelem < 2 | isempty(check_string) == %F)
+ SCI2C_nelem = SCI2C_nelem + 1
+ line_position = line_position + 1;
+ if (isempty(check_string) == %F)
+ tmpannstring = eval(SharedInfo.Annotations.FUNSIZE);
+ check_string = stripblanks(mgetl(inclsfid,1));
+ if (SCI2Cstrncmps1size(tmpannstring,check_string))
// #RNU_RES_B
PrintStringInfo(' Line '+string(line_position)+' - Function Size Annotation: '+' ""'+check_string+' ""',...
- ReportFileName,'file','y');
+ ReportFileName,'file','y');
// #RNU_RES_E
- FunSizeAnnot(cntout,1) = ...
- stripblanks(part(check_string,length(tmpannstring)+1:length(check_string)));
- end
- else
- PrintStringInfo(' ',ReportFileName,'both','y');
- PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
- PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
- end
- SCI2C_nelem = 2; // Useful for eval.
- line_position = line_position + 1;
- if (isempty(check_string) == %F)
- tmpannstring = eval(SharedInfo.Annotations.FUNSIZE);
- check_string = stripblanks(mgetl(inclsfid,1));
- if (SCI2Cstrncmps1size(tmpannstring,check_string))
- PrintStringInfo(' Line '+string(line_position)+' - Function Size Annotation: '+' ""'+check_string+' ""',...
- ReportFileName,'file','y');
- FunSizeAnnot(cntout,2) = ...
- stripblanks(part(check_string,length(tmpannstring)+1:length(check_string)));
- end
- else
- PrintStringInfo(' ',ReportFileName,'both','y');
- PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function type annotation (//_SCI2C_FUNSIZE:) not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
- PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
- end
+ FunSizeAnnot(cntout,SCI2C_nelem) = ...
+ stripblanks(part(check_string,length(tmpannstring)+1:length(check_string)));
+ end
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ SCI2Cerror(' ');
+ end
+ end
end
end
// --- End loop over the lines of the input file. ---
|