diff options
author | Brijeshcr | 2017-07-07 23:02:01 +0530 |
---|---|---|
committer | Brijeshcr | 2017-07-07 23:02:01 +0530 |
commit | ab2d4e957b52edb2c04bd524a2c062c8058623c8 (patch) | |
tree | d53fb7cb52976c19d1b9c5380257226c09f65272 /2.3-1/macros/CCodeGeneration | |
parent | ce61940a1398e66d9d09b81241789576c1ceca01 (diff) | |
parent | ccf9047acb6f74a67a23659aeb21e6bee6940df7 (diff) | |
download | Scilab2C-ab2d4e957b52edb2c04bd524a2c062c8058623c8.tar.gz Scilab2C-ab2d4e957b52edb2c04bd524a2c062c8058623c8.tar.bz2 Scilab2C-ab2d4e957b52edb2c04bd524a2c062c8058623c8.zip |
Array Declration for function
Diffstat (limited to '2.3-1/macros/CCodeGeneration')
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci | 7 | ||||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_IfExpression.sci | 1 | ||||
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_WhileExpression.sci | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci index 475e2e0c..bdaf9c0e 100644 --- a/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci +++ b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci @@ -11,6 +11,10 @@ function Cdeclaration = C_GenDeclarations_Dup(InArg,NInArg,com_type,ArgStruct,CD // // Status: // 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// 25-June-2017 -- Ukasha Noor: Modified it. +// This function is called for array declaration in C. +// // 10-Jun-2008 -- Raffaele Nutricato: adapted to work with realloc function. // // Copyright 2007 Raffaele Nutricato. @@ -84,6 +88,9 @@ if (ArgStruct.Dimension > 0) computedSize = computedSize + ' * ' + ArgStruct.Size(sizeIterator); computedSizeField = computedSizeField + ', ' + ArgStruct.Size(sizeIterator); end +// Modified Changes: row tells number of rows and col is number of columns in array. +// col_type tells whether it is floatComplex or doubleComplex or real. +// and accordingly it declares the array. Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+' '+ArgStruct.Name+'['+computedSize+']={'; row = eval(ArgStruct.Size(1)) col = eval(ArgStruct.Size(2)) diff --git a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci index 359b7882..630134e1 100644 --- a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci +++ b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci @@ -11,6 +11,7 @@ function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,Fi // // Status: // 27-Oct-2007 -- Raffaele Nutricato: Author. +// 28-June-2017 -- Ukasha Noor: Modified By // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it diff --git a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci index 368ccffa..36fcc4f2 100644 --- a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci +++ b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci @@ -11,6 +11,7 @@ function SharedInfo = C_WhileExpression(IfCondArg,NIfCondArg,Op,NOp,FileInfo,Sha // // Status: // 15-Nov-2007 -- Raffaele Nutricato: Author. +// 27-June-2017 -- Ukasha Noor: Modified by // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it |