diff options
Diffstat (limited to 'macros/FunctionAnnotation/FA_TP_MAX.sci')
-rw-r--r-- | macros/FunctionAnnotation/FA_TP_MAX.sci | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/macros/FunctionAnnotation/FA_TP_MAX.sci b/macros/FunctionAnnotation/FA_TP_MAX.sci index 0b78f9e3..c1520794 100644 --- a/macros/FunctionAnnotation/FA_TP_MAX.sci +++ b/macros/FunctionAnnotation/FA_TP_MAX.sci @@ -1,45 +1,45 @@ -function opout = FA_TP_MAX(in1,in2)
-// function opout = FA_TP_MAX(in1,in2)
-// -----------------------------------------------------------------
-// Type-Maximum function for Function Annotations.
-// Returns the maximum between the two data types in input according
-// to a predefined priority. For example z(double complex) is
-// greater that c(single complex).
-//
-// Input data:
-// in1: string specifying the data type number 1.
-// in2: string specifying the data type number 2.
-//
-// Output data:
-// opout: string containing the computed result.
-//
-// Status:
-// 26-Oct-2007 -- Raffaele Nutricato: Author.
-// 26-Oct-2007 -- Alberto Morea: Test Ok.
-//
-// Copyright 2007 Raffaele Nutricato & Alberto Morea.
-// Contact: raffaele.nutricato@tiscali.it
-// -----------------------------------------------------------------
-
-// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),2,2);
-
-// ------------------------
-// --- Generate Output. ---
-// ------------------------
-in1Pin2 = in1+in2;
-opout = in1;
-
-if (in2 == 'z')
- opout = 'z';
-elseif (in1Pin2 == 'sd')
- opout = 'd';
-elseif (in1Pin2 == 'sc')
- opout = 'c';
-elseif (in1Pin2 == 'dc')
- opout = 'z';
-end
-
-endfunction
+function opout = FA_TP_MAX(in1,in2) +// function opout = FA_TP_MAX(in1,in2) +// ----------------------------------------------------------------- +// Type-Maximum function for Function Annotations. +// Returns the maximum between the two data types in input according +// to a predefined priority. For example z(double complex) is +// greater that c(single complex). +// +// Input data: +// in1: string specifying the data type number 1. +// in2: string specifying the data type number 2. +// +// Output data: +// opout: string containing the computed result. +// +// Status: +// 26-Oct-2007 -- Raffaele Nutricato: Author. +// 26-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2007 Raffaele Nutricato & Alberto Morea. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +in1Pin2 = in1+in2; +opout = in1; + +if (in2 == 'z') + opout = 'z'; +elseif (in1Pin2 == 'sd') + opout = 'd'; +elseif (in1Pin2 == 'sc') + opout = 'c'; +elseif (in1Pin2 == 'dc') + opout = 'z'; +end + +endfunction |