summaryrefslogtreecommitdiff
path: root/2.3-1/macros/CCodeGeneration/C_IfExpression.sci
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/macros/CCodeGeneration/C_IfExpression.sci')
-rw-r--r--2.3-1/macros/CCodeGeneration/C_IfExpression.sci24
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 630134e1..17138dcd 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
@@ -20,6 +24,7 @@ function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,Fi
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
+<<<<<<< HEAD
SCI2CNInArgCheck(argn(2),7,7);
//global SCI2CSTACK
@@ -30,6 +35,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. ---
@@ -42,7 +55,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. ---
@@ -71,6 +88,7 @@ if SCI2Cstrncmps1size(ASTIfExpType,'else')
SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out');
end
+<<<<<<< HEAD
i=1;
k=1;
CCall ='';
@@ -88,6 +106,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');