diff options
Diffstat (limited to 'macros/FunctionAnnotation')
-rw-r--r-- | macros/FunctionAnnotation/FA_ADD.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_DIV.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_GetOutArgInfo.sci | 22 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_INT.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_MAX.sci | 104 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_MIN.sci | 88 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_MUL.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_REAL.sci | 92 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_SUB.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci | 26 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_OPCC.sci | 6 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_OPPLUS.sci | 20 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_OPRC.sci | 6 |
13 files changed, 192 insertions, 192 deletions
diff --git a/macros/FunctionAnnotation/FA_ADD.sci b/macros/FunctionAnnotation/FA_ADD.sci index 1973f8d7..4193422b 100644 --- a/macros/FunctionAnnotation/FA_ADD.sci +++ b/macros/FunctionAnnotation/FA_ADD.sci @@ -27,7 +27,7 @@ SCI2CNInArgCheck(argn(2),2,2); // ------------------------
// --- Generate Output. ---
// ------------------------
-if (SCI2Cisnum(in1) & SCI2Cisnum(in2))
+if (isnum(in1) & isnum(in2))
in1num = eval(in1);
in2num = eval(in2);
outnum = in1num+in2num;
@@ -38,6 +38,6 @@ if (SCI2Cisnum(in1) & SCI2Cisnum(in2)) end
else
opout = string('('+in1+'+'+in2+')');
-end
+end
endfunction
diff --git a/macros/FunctionAnnotation/FA_DIV.sci b/macros/FunctionAnnotation/FA_DIV.sci index bce6966d..d4ec0ccd 100644 --- a/macros/FunctionAnnotation/FA_DIV.sci +++ b/macros/FunctionAnnotation/FA_DIV.sci @@ -26,7 +26,7 @@ SCI2CNInArgCheck(argn(2),2,2); // ------------------------
// --- Generate Output. ---
// ------------------------
-if (SCI2Cisnum(in1) & SCI2Cisnum(in2))
+if (isnum(in1) & isnum(in2))
in1num = eval(in1);
in2num = eval(in2);
outnum = in1num/in2num;
@@ -37,5 +37,5 @@ if (SCI2Cisnum(in1) & SCI2Cisnum(in2)) end
else
opout = '('+string(in1)+'/'+string(in2)+')';
-end
+end
endfunction
diff --git a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci index 6566b2ee..0cdba234 100644 --- a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci +++ b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci @@ -38,7 +38,7 @@ for cntin = 1:NInArg // IN(cntin).VAL = '__SCI2CNANSIZE'; //RNU: toglimi
//RNU: Replace the value of the variable with its name, in case it is a scalar variable.
// #RNU_RES_E
- IN(cntin).VAL = InArg(cntin).Name;
+ IN(cntin).VAL = InArg(cntin).Name;
else
IN(cntin).VAL = string(InArg(cntin).Value);
end
@@ -58,7 +58,7 @@ flagfindlike = 0; for counterin = 1:NInArg
if (InArg(counterin).FindLike == 1 | InArg(counterin).FindLike == -1)
// #RNU_RES_B
- // Then we must assume that the output will be findlike
+ // Then we must assume that the output will be findlike
// 0 = no find-like
// 1 = pure find-like
//-1 = similar to find-like (out=fun(in)) where in is find-like.
@@ -73,14 +73,14 @@ for counterout = 1:NOutArg else
UpdatedOutArg(counterout).Type = eval(FunTypeAnnot(counterout));
end
- UpdatedOutArg(counterout).FindLike = 0;
+ UpdatedOutArg(counterout).FindLike = 0;
lengthFA_SZ_RTMAX = length('FA_SZ_RTMAX');
-
+
if (SCI2Cstrncmps1size('FA_SZ_RTMAX',FunSizeAnnot(counterout,1)))
UpdatedOutArg(counterout).FindLike = 1;
FunSizeAnnot(counterout,1) = part(FunSizeAnnot(counterout,1),lengthFA_SZ_RTMAX+1:length(FunSizeAnnot(counterout,1)));
end
-
+
if (SCI2Cstrncmps1size('FA_SZ_RTMAX',FunSizeAnnot(counterout,2)))
UpdatedOutArg(counterout).FindLike = 1;
FunSizeAnnot(counterout,2) = part(FunSizeAnnot(counterout,2),lengthFA_SZ_RTMAX+1:length(FunSizeAnnot(counterout,2)));
@@ -89,10 +89,10 @@ for counterout = 1:NOutArg if (flagfindlike == -1)
UpdatedOutArg(counterout).FindLike = -1;
end
-
+
// #RNU_RES_B
// When the size is given by e IN(x).VAL annotation we can have two cases:
- // IN(x).VAL is a number or IN(x).VAL is %nan. When it is %nan the
+ // IN(x).VAL is a number or IN(x).VAL is %nan. When it is %nan the
// size is equal to the name of IN(x).
// This is a dynamic memory extension of a local variable and for the moment
// we issue an error according to SCI2C specifications
@@ -104,7 +104,7 @@ for counterout = 1:NOutArg else
UpdatedOutArg(counterout).Size(1) = string(tmpeval);
end
- elseif(SCI2Cisnum(tmpeval))
+ elseif(isnum(tmpeval))
if (eval(tmpeval) <= 0)
EM_ZeroSize(ReportFileName);
else
@@ -113,7 +113,7 @@ for counterout = 1:NOutArg else
UpdatedOutArg(counterout).Size(1) = string(tmpeval);
end
-
+
tmpeval = eval(FunSizeAnnot(counterout,2));
if (IsNanSize(tmpeval))
if SharedInfo.ForExpr.OnExec == 0
@@ -124,7 +124,7 @@ for counterout = 1:NOutArg // #RNU_RES_E
UpdatedOutArg(counterout).Size(2) = string(tmpeval);
end
- elseif(SCI2Cisnum(tmpeval))
+ elseif(isnum(tmpeval))
if (eval(tmpeval) <= 0)
EM_ZeroSize(ReportFileName);
else
@@ -133,7 +133,7 @@ for counterout = 1:NOutArg else
UpdatedOutArg(counterout).Size(2) = string(tmpeval);
end
-
+
UpdatedOutArg(counterout).Value = %nan;
UpdatedOutArg(counterout).Dimension = GetSymbolDimension(UpdatedOutArg(counterout).Size);
UpdatedOutArg(counterout).Scope = 'Temp';//NUT anche su questo si puo' ragionare verifica anche la handleoperation.
diff --git a/macros/FunctionAnnotation/FA_INT.sci b/macros/FunctionAnnotation/FA_INT.sci index c4e2cc3d..e1bdba33 100644 --- a/macros/FunctionAnnotation/FA_INT.sci +++ b/macros/FunctionAnnotation/FA_INT.sci @@ -27,7 +27,7 @@ SCI2CNInArgCheck(argn(2),1,1); // ------------------------
// --- Generate Output. ---
// ------------------------
-if (SCI2Cisnum(in1))
+if (isnum(in1))
outnum = int(eval(in1));
if isnan(outnum)
opout = '__SCI2CNANSIZE';
@@ -36,5 +36,5 @@ if (SCI2Cisnum(in1)) end
else
opout = in1;
-end
+end
endfunction
diff --git a/macros/FunctionAnnotation/FA_MAX.sci b/macros/FunctionAnnotation/FA_MAX.sci index 2ecfc6ac..c725dd23 100644 --- a/macros/FunctionAnnotation/FA_MAX.sci +++ b/macros/FunctionAnnotation/FA_MAX.sci @@ -1,52 +1,52 @@ -function opout = FA_MAX(in1,in2)
-// function opout = FA_MAX(in1,in2)
-// -----------------------------------------------------------------
-// Maximum function for Function Annotations.
-// When in1 and in2 are both symbols this function returns
-// in1.
-//
-// Input data:
-// in1: string specifying a number or a symbol.
-// in2: string specifying a number or a symbol.
-//
-// Output data:
-// opout: string containing the computed result.
-//
-// Status:
-// 26-Oct-2007 -- Raffaele Nutricato: Author.
-// 26-Oct-2007 -- Alberto Morea: Test Ok.
-//
-// Copyright 2008 Raffaele Nutricato & Alberto Morea.
-// Contact: raffaele.nutricato@tiscali.it
-// -----------------------------------------------------------------
-
-// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),2,2);
-
-//SCI2Cerror('Not allowed to use FA_MAX in this release.');
-
-// ------------------------
-// --- Generate Output. ---
-// ------------------------
-if (SCI2Cisnum(in1))
- in1num = eval(in1);
- if (SCI2Cisnum(in2))
- in2num = eval(in2);
- outnum = max(in1num,in2num);
- if isnan(outnum)
- opout = '__SCI2CNANSIZE';
- else
- opout = string(outnum);
- end
- else
- if (in1num == 1)
- opout = string(in2);
- end
- end
-else
- opout = string(in1);
-end -
-endfunction
+function opout = FA_MAX(in1,in2) +// function opout = FA_MAX(in1,in2) +// ----------------------------------------------------------------- +// Maximum function for Function Annotations. +// When in1 and in2 are both symbols this function returns +// in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying a number or a symbol. +// +// Output data: +// opout: string containing the computed result. +// +// Status: +// 26-Oct-2007 -- Raffaele Nutricato: Author. +// 26-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2008 Raffaele Nutricato & Alberto Morea. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +//SCI2Cerror('Not allowed to use FA_MAX in this release.'); + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + in1num = eval(in1); + if (isnum(in2)) + in2num = eval(in2); + outnum = max(in1num,in2num); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end + else + if (in1num == 1) + opout = string(in2); + end + end +else + opout = string(in1); +end + +endfunction diff --git a/macros/FunctionAnnotation/FA_MIN.sci b/macros/FunctionAnnotation/FA_MIN.sci index 874cee8a..e1539103 100644 --- a/macros/FunctionAnnotation/FA_MIN.sci +++ b/macros/FunctionAnnotation/FA_MIN.sci @@ -1,45 +1,45 @@ -function opout = FA_MIN(in1,in2)
-// function opout = FA_MIN(in1,in2)
-// -----------------------------------------------------------------
-// Minimum function for Function Annotations.
-// When in1 and in2 are both symbols this function returns
-// in1.
-//
-// Input data:
-// in1: string specifying a number or a symbol.
-// in2: string specifying a number or a symbol.
-//
-// Output data:
-// opout: string containing the computed result.
-
-// -----------------------------------------------------------------
-
-// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),2,2);
-
-
-// ------------------------
-// --- Generate Output. ---
-// ------------------------
-if (SCI2Cisnum(in1))
- in1num = eval(in1);
- if (SCI2Cisnum(in2))
- in2num = eval(in2);
- outnum = min(in1num,in2num);
- if isnan(outnum)
- opout = '__SCI2CNANSIZE';
- else
- opout = string(outnum);
- end
- else
- if (in1num == 1)
- opout = string(in2);
- end
- end
-else
- opout = string(in1);
-end -
+function opout = FA_MIN(in1,in2) +// function opout = FA_MIN(in1,in2) +// ----------------------------------------------------------------- +// Minimum function for Function Annotations. +// When in1 and in2 are both symbols this function returns +// in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying a number or a symbol. +// +// Output data: +// opout: string containing the computed result. + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + in1num = eval(in1); + if (isnum(in2)) + in2num = eval(in2); + outnum = min(in1num,in2num); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end + else + if (in1num == 1) + opout = string(in2); + end + end +else + opout = string(in1); +end + endfunction diff --git a/macros/FunctionAnnotation/FA_MUL.sci b/macros/FunctionAnnotation/FA_MUL.sci index d3495a02..8c9a930a 100644 --- a/macros/FunctionAnnotation/FA_MUL.sci +++ b/macros/FunctionAnnotation/FA_MUL.sci @@ -27,7 +27,7 @@ SCI2CNInArgCheck(argn(2),2,2); // ------------------------
// --- Generate Output. ---
// ------------------------
-if (SCI2Cisnum(in1) & SCI2Cisnum(in2))
+if (isnum(in1) & isnum(in2))
in1num = eval(in1);
in2num = eval(in2);
outnum = in1num*in2num;
@@ -38,5 +38,5 @@ if (SCI2Cisnum(in1) & SCI2Cisnum(in2)) end
else
opout = '('+string(in1)+'*'+string(in2)+')';
-end
+end
endfunction
diff --git a/macros/FunctionAnnotation/FA_REAL.sci b/macros/FunctionAnnotation/FA_REAL.sci index e55583d7..7b8c0fda 100644 --- a/macros/FunctionAnnotation/FA_REAL.sci +++ b/macros/FunctionAnnotation/FA_REAL.sci @@ -1,50 +1,50 @@ -//
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET
-//
-// This file must be used under the terms of the CeCILL.
-// This source file is licensed as described in the file COPYING, which
-// you should have received as part of this distribution. The terms
-// are also available at
-// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-//
-//
-function opout = FA_REAL(in1, in2)
-// function opout = FA_REAL(in1, in2)
-// -----------------------------------------------------------------
-// Real function for Function Annotations.
-// When in1 is a number opout = real(in1); where real returns in1
-// real part. If in1 is string opout = in1.
-//
-// Input data:
-// in1: string specifying a number or a symbol.
-// in2: string specifying in1 type
-//
-// Output data:
-// opout: string containing the computed result.
-//
-// -----------------------------------------------------------------
-
-// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),2,2);
-
-// ------------------------
-// --- Generate Output. ---
-// ------------------------
-if (SCI2Cisnum(in1))
- outnum = real(eval(in1));
- if isnan(outnum)
- opout = '__SCI2CNANSIZE';
- else
- opout = string(outnum);
- end
+// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// +// +function opout = FA_REAL(in1, in2) +// function opout = FA_REAL(in1, in2) +// ----------------------------------------------------------------- +// Real function for Function Annotations. +// When in1 is a number opout = real(in1); where real returns in1 +// real part. If in1 is string opout = in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying in1 type +// +// Output data: +// opout: string containing the computed result. +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + outnum = real(eval(in1)); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end else if (in1 == "%i") opout = " 0 "; - else
+ else opout = in2+"0real"+FA_TP_REAL(in2)+"0"+"("+in1+")"; - end
-end
-endfunction
+ end +end +endfunction diff --git a/macros/FunctionAnnotation/FA_SUB.sci b/macros/FunctionAnnotation/FA_SUB.sci index 039ff1af..1ef0ad46 100644 --- a/macros/FunctionAnnotation/FA_SUB.sci +++ b/macros/FunctionAnnotation/FA_SUB.sci @@ -26,7 +26,7 @@ SCI2CNInArgCheck(argn(2),2,2); // ------------------------
// --- Generate Output. ---
// ------------------------
-if (SCI2Cisnum(in1) & SCI2Cisnum(in2))
+if (isnum(in1) & isnum(in2))
in1num = eval(in1);
in2num = eval(in2);
outnum = in1num-in2num;
@@ -37,5 +37,5 @@ if (SCI2Cisnum(in1) & SCI2Cisnum(in2)) end
else
opout = '('+string(in1)+'-'+string(in2)+')';
-end
+end
endfunction
diff --git a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci index b1f8f982..c3cae536 100644 --- a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci +++ b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci @@ -1,20 +1,20 @@ function opout = FA_SZ_FROM_VAL(in1,in2) -// function opout = FA_SZ_FROM_VAL(in1,in2)
+// function opout = FA_SZ_FROM_VAL(in1,in2) // ----------------------------------------------------------------- -// Return a size according to the floored value of the first argument
-//
-// Input data:
-// in1: string specifying a number .
//
-//
-// Output data:
-// opout: string containing the computed result.
-//
+// Return a size according to the floored value of the first argument +// +// Input data: +// in1: string specifying a number . +// +// Output data: +// opout: string containing the computed result. +// // ----------------------------------------------------------------- SCI2CNInArgCheck(argn(2),2,2); -
-if (SCI2Cisnum(in1)) + +if (isnum(in1)) in1num = eval(in1) ; if isnan(in1num) opout = '__SCI2CNANSIZE'; @@ -22,7 +22,7 @@ if (SCI2Cisnum(in1)) opout= '0' ; else opout = string ( floor (abs(in1num))) ; - + end @@ -30,7 +30,7 @@ else opout = in2+"0floor"+in2+"0"+"("+in1+")"; opout = in2+"0abs"+in2+"0"+"("+opout+")"; -end +end endfunction: diff --git a/macros/FunctionAnnotation/FA_SZ_OPCC.sci b/macros/FunctionAnnotation/FA_SZ_OPCC.sci index cc532e24..50527771 100644 --- a/macros/FunctionAnnotation/FA_SZ_OPCC.sci +++ b/macros/FunctionAnnotation/FA_SZ_OPCC.sci @@ -2,7 +2,7 @@ function opoutsize = FA_SZ_OPCC(in1size,in2size) // function opoutsize = FA_SZ_OPCC(in1size,in2size)
// -----------------------------------------------------------------
// Returns the size of the output computed by OPCC operator.
-//
+//
//
// Status:
// 08-Mar-2008 -- Raffaele Nutricato: Author.
@@ -27,11 +27,11 @@ in2size = string(in2size); in1dim = GetSymbolDimension(in1size);
in2dim = GetSymbolDimension(in2size);
-if (SCI2Cisnum(in1size(1)) & SCI2Cisnum(in2size(1)))
+if (isnum(in1size(1)) & isnum(in2size(1)))
in1num = eval(in1size(1));
in2num = eval(in2size(1));
opoutsize(1) = string(in1num+in2num);
-else
+else
opoutsize(1) = '('+string(in1size(1))+'+'+string(in2size(1))+')';
end
diff --git a/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci b/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci index d0df4c6c..aae50af6 100644 --- a/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci +++ b/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci @@ -3,7 +3,7 @@ function opoutsize = FA_SZ_OPPLUS(in1size,in2size,in1type,in2type) // -----------------------------------------------------------------
// Returns the size of the output computed by OPPLUS operator,
// including the string operations.
-//
+//
// Assuming:
// size(in1) = [in1r,in1c]
// size(in2) = [in2r,in2c]
@@ -12,7 +12,7 @@ function opoutsize = FA_SZ_OPPLUS(in1size,in2size,in1type,in2type) // we have the following combinations:
// in1 in2 outr outc
// -----------------------
-// S S in2r in2c
+// S S in2r in2c
// S M in2r in2c
// M S in1r in1c
// M M in1r in1c
@@ -23,18 +23,18 @@ function opoutsize = FA_SZ_OPPLUS(in1size,in2size,in1type,in2type) // This is the main difference between - and + operators.
//
// Input data:
-// in1size: size of input number 1. It is an array of 2 strings.
+// in1size: size of input number 1. It is an array of 2 strings.
// The first string specifies the number of rows.
// The second string specifies the number of columns.
-//
-// in2size: size of input number 2. It is an array of 2 strings.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
// The first string specifies the number of rows.
// The second string specifies the number of columns.
//
// Output data:
-// opoutsize: size of output. It is an array of 2 strings.
+// opoutsize: size of output. It is an array of 2 strings.
// The first string specifies the number of rows.
-// The second string specifies the number of columns.
+// The second string specifies the number of columns.
//
// Status:
// 08-Dec-2007 -- Raffaele Nutricato: Author.
@@ -63,7 +63,7 @@ if ((in1type ~= 'g') & (in2type ~= 'g')) opoutsize = FA_SZ_OPPLUSA(in1size,in2size);
elseif ((in1type == 'g') & (in2type == 'g'))
opoutsize(1) = '1';
- if (SCI2Cisnum(in1size(1)) & SCI2Cisnum(in2size(1)))
+ if (isnum(in1size(1)) & isnum(in2size(1)))
in1num = eval(in1size(1));
in2num = eval(in2size(1));
if (in1num > 1 | in2num > 1)
@@ -74,7 +74,7 @@ elseif ((in1type == 'g') & (in2type == 'g')) //NUT: ho provato in scilab a fare la trasposta di una stringa e ottengo sempre 1x1.
end
end
- if (SCI2Cisnum(in1size(2)) & SCI2Cisnum(in2size(2)))
+ if (isnum(in1size(2)) & isnum(in2size(2)))
in1num = eval(in1size(2));
in2num = eval(in2size(2));
opoutsize(2) = string(in1num+in2num-1);
@@ -83,7 +83,7 @@ elseif ((in1type == 'g') & (in2type == 'g')) else
opoutsize(2) = string(opoutsize(2));
end
- else
+ else
opoutsize(2) = '('+string(in1size(2))+'+'+string(in2size(2))+'-1)';
end
else
diff --git a/macros/FunctionAnnotation/FA_SZ_OPRC.sci b/macros/FunctionAnnotation/FA_SZ_OPRC.sci index 2c9f1c18..c4da4a0f 100644 --- a/macros/FunctionAnnotation/FA_SZ_OPRC.sci +++ b/macros/FunctionAnnotation/FA_SZ_OPRC.sci @@ -2,7 +2,7 @@ function opoutsize = FA_SZ_OPRC(in1size,in2size) // function opoutsize = FA_SZ_OPRC(in1size,in2size)
// -----------------------------------------------------------------
// Returns the size of the output computed by OPRC operator.
-//
+//
//
// Status:
// 08-Mar-2008 -- Raffaele Nutricato: Author.
@@ -29,11 +29,11 @@ in2dim = GetSymbolDimension(in2size); opoutsize(1) = in1size(1);
-if (SCI2Cisnum(in1size(2)) & SCI2Cisnum(in2size(2)))
+if (isnum(in1size(2)) & isnum(in2size(2)))
in1num = eval(in1size(2));
in2num = eval(in2size(2));
opoutsize(2) = string(in1num+in2num);
-else
+else
opoutsize(2) = '('+string(in1size(2))+'+'+string(in2size(2))+')';
end
|