diff options
Diffstat (limited to '2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci')
-rw-r--r-- | 2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci b/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci new file mode 100644 index 00000000..71b93328 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci @@ -0,0 +1,26 @@ +function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs)
+// function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Check that NInArgs is in the range specified by MinNArgs and
+// MaxNArgs.
+//
+// Input data:
+// NInArgs: number of input arguments of the function under test.
+// MinNArgs: minimum number of input arguments allowed.
+// MaxNArgs: maximum number of input arguments allowed.
+//
+// Output data:
+// ---
+// #RNU_RES_E
+//
+// Status:
+// 23-Nov-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato
+// -----------------------------------------------------------------
+
+if ((NInArgs < MinNArgs) | (NInArgs > MaxNArgs))
+ error(9999, 'Incorrect number of input arguments.');
+end
+endfunction
|