diff options
author | yash1112 | 2017-07-07 21:20:49 +0530 |
---|---|---|
committer | yash1112 | 2017-07-07 21:20:49 +0530 |
commit | 3f52712f806fbd80d66dfdcaff401e5cf94dcca4 (patch) | |
tree | a8333b8187cb44b505b9fe37fc9a7ac8a1711c10 /macros/FunctionAnnotation/FA_SZ_SEL1.sci | |
download | Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.tar.gz Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.tar.bz2 Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.zip |
sci2c arduino updated
Diffstat (limited to 'macros/FunctionAnnotation/FA_SZ_SEL1.sci')
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_SEL1.sci | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/macros/FunctionAnnotation/FA_SZ_SEL1.sci b/macros/FunctionAnnotation/FA_SZ_SEL1.sci new file mode 100644 index 0000000..6071e96 --- /dev/null +++ b/macros/FunctionAnnotation/FA_SZ_SEL1.sci @@ -0,0 +1,48 @@ +function opout = FA_SZ_SEL1(in1,in2)
+// function opout = FA_SZ_SEL1(in1,in2)
+// -----------------------------------------------------------------
+// Determines the number of rows of the output arguments
+// according to the number of rows of the first input argument and
+// the specifier in2 which can be 1,2 or 'r','c' and 'm'.
+// In this release the 'm' specifier is not supported so when it is
+// used SCI2C will issue an error.
+//
+// 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:
+// 16-Mar-2008 -- Raffaele Nutricato: Author.
+// 16-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------ + +
+SCI2CNInArgCheck(argn(2),2,2);
+ReportFileName = '';
+in2 = string(in2);
+
+if (in2 == '1' | in2 == '""rr""' ) // Where can r become rr ???
+ opout = '1';
+elseif (in2 == '2' | in2 == '""c""' )
+ opout = in1; + +
+else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Cannot associate the second input argument to a known specifier.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Please rearrange your code by using one of the following specifiers:',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: 1 or 2.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Cannot associate the second input argument to a known specifier.');
+end
+endfunction
|