diff options
author | yash1112 | 2017-07-07 22:34:47 +0530 |
---|---|---|
committer | yash1112 | 2017-07-07 22:34:47 +0530 |
commit | 2a6c003c67faafd257984f4ae632e40bc6fa9a32 (patch) | |
tree | 5eecfb962980f7c32cd167bd7e124166e4741343 /2.3-1/macros/CCodeGeneration/C_IfExpression.sci | |
parent | ce61940a1398e66d9d09b81241789576c1ceca01 (diff) | |
parent | 640f9fcf3f64298c7958f4bde5a7e6a7602a690d (diff) | |
download | Scilab2C-2a6c003c67faafd257984f4ae632e40bc6fa9a32.tar.gz Scilab2C-2a6c003c67faafd257984f4ae632e40bc6fa9a32.tar.bz2 Scilab2C-2a6c003c67faafd257984f4ae632e40bc6fa9a32.zip |
1.Sci2cDeps updated 2.Windows compatibility resolved
Diffstat (limited to '2.3-1/macros/CCodeGeneration/C_IfExpression.sci')
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_IfExpression.sci | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci index 359b7882..23be4522 100644 --- a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci +++ b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci @@ -1,4 +1,8 @@ +<<<<<<< HEAD function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,FileInfo,SharedInfo) +======= +function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo) +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo) // ----------------------------------------------------------------- // //NUT: add description here @@ -19,6 +23,7 @@ function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,Fi // ------------------------------ // --- Check input arguments. --- // ------------------------------ +<<<<<<< HEAD SCI2CNInArgCheck(argn(2),7,7); //global SCI2CSTACK @@ -29,6 +34,14 @@ SCI2CNInArgCheck(argn(2),7,7); //if ((NIfCondArg ~= 1) & (ASTIfExpType~='else')) // error(9999, 'Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.'); //end +======= +SCI2CNInArgCheck(argn(2),5,5); + +// --- Check NIfCondArg value. --- +if ((NIfCondArg ~= 1) & (ASTIfExpType~='else')) + error(9999, 'Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.'); +end +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // ----------------------- // --- Initialization. --- @@ -41,7 +54,11 @@ CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; // #RNU_RES_B PrintStringInfo(' ',ReportFileName,'file','y'); +<<<<<<< HEAD PrintStringInfo('***Generating C code***'+ string(NIfCondArg),ReportFileName,'file','y'); +======= +PrintStringInfo('***Generating C code***',ReportFileName,'file','y'); +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // #RNU_RES_E // --------------------------- // --- End Initialization. --- @@ -70,6 +87,7 @@ if SCI2Cstrncmps1size(ASTIfExpType,'else') SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out'); end +<<<<<<< HEAD i=1; k=1; CCall =''; @@ -87,6 +105,12 @@ if (ASTIfExpType~='else') i = i + 1; end CCall = CCall+')'; +======= +CCall =''; +CCall = CCall+CFunName; +if (ASTIfExpType~='else') + CCall = CCall+'('+IfCondArg(1)+')'; +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 end PrintStringInfo(' '+CCall,ReportFileName,'file','y'); PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); |