diff options
author | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
commit | 06337f0dc8114c70fd0c7767083971a0d091750a (patch) | |
tree | 446481550ba88e6e0f7df2db7fdc66d2016ee2f1 /macros/CCodeGeneration/C_WhileExpression.sci | |
parent | c2e305c3b82ed944d57402dd515b3d5839a31980 (diff) | |
download | scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.tar.gz scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.tar.bz2 scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.zip |
LinearAlgebra and MatrixOperation Update
Diffstat (limited to 'macros/CCodeGeneration/C_WhileExpression.sci')
-rw-r--r-- | macros/CCodeGeneration/C_WhileExpression.sci | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/macros/CCodeGeneration/C_WhileExpression.sci b/macros/CCodeGeneration/C_WhileExpression.sci index 368ccffa..edd2830e 100644 --- a/macros/CCodeGeneration/C_WhileExpression.sci +++ b/macros/CCodeGeneration/C_WhileExpression.sci @@ -1,4 +1,4 @@ -function SharedInfo = C_WhileExpression(IfCondArg,NIfCondArg,Op,NOp,FileInfo,SharedInfo) +function SharedInfo = C_WhileExpression(FileInfo,SharedInfo) // function SharedInfo = C_WhileExpression(FileInfo,SharedInfo) // ----------------------------------------------------------------- // //NUT: add description here @@ -19,7 +19,7 @@ function SharedInfo = C_WhileExpression(IfCondArg,NIfCondArg,Op,NOp,FileInfo,Sha // ------------------------------ // --- Check input arguments. --- // ------------------------------ -SCI2CNInArgCheck(argn(2),6,6); +SCI2CNInArgCheck(argn(2),2,2); // ----------------------- // --- Initialization. --- @@ -63,7 +63,7 @@ for cntstr = 1:NumCStrings // Epilogue if (length(C_Strings(cntstr)) == 0) C_Strings(cntstr) = ' '; // RNU for Bruno: If I don't do that I get a PrintStringInfo error related to mputstr. - // Function not defined for given argument type(s), + // Function not defined for given argument type(s),
// check arguments or define function %0_mputstr for overloading. end PrintStringInfo(C_Strings(cntstr),CPass1WhileEpilFileName ,'file','y','n'); @@ -76,27 +76,7 @@ PrintStringInfo('}',CPass1WhileEpilFileName ,'file','y'); // ------------------------------ // --- Insert for expression. --- // ------------------------------ -//CCall = 'while('+SharedInfo.WhileExpr.CondVar+')'; -//PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); - -i=1; -k=1; -CCall =''; -CCall = CCall+'while'; - CCall = CCall+'('; - while i <= NIfCondArg - CCall = CCall + IfCondArg(i) + ' '; - //d = modulo(i,3); - //PrintStringInfo(' '+string(i)+string(d),'file','y'); - if (modulo(i,3)==0 & i<>NIfCondArg) - CCall = CCall + Op(k) + ' '; - k = k + 1; - end - i = i + 1; - end - CCall = CCall+')'; - -PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +CCall = 'while('+SharedInfo.WhileExpr.CondVar+')'; PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); // ------------------- |