summaryrefslogtreecommitdiff
path: root/2.3-1/macros/GeneralFunctions/IsNanSize.sci
diff options
context:
space:
mode:
authorSandeep Gupta2017-06-18 23:55:40 +0530
committerSandeep Gupta2017-06-18 23:55:40 +0530
commitb43eccd4cffed5bd1017c5821524fb6e49202f78 (patch)
tree4c53d798252cbeae9bcf7dc9604524b20bb10f27 /2.3-1/macros/GeneralFunctions/IsNanSize.sci
downloadScilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.gz
Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.bz2
Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.zip
First commit
Diffstat (limited to '2.3-1/macros/GeneralFunctions/IsNanSize.sci')
-rw-r--r--2.3-1/macros/GeneralFunctions/IsNanSize.sci39
1 files changed, 39 insertions, 0 deletions
diff --git a/2.3-1/macros/GeneralFunctions/IsNanSize.sci b/2.3-1/macros/GeneralFunctions/IsNanSize.sci
new file mode 100644
index 00000000..486f6fcc
--- /dev/null
+++ b/2.3-1/macros/GeneralFunctions/IsNanSize.sci
@@ -0,0 +1,39 @@
+function outbool = IsNanSize(instring)
+// function outbool = IsNanSize(instring)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// It searches for __SCI2CNANSIZE string in the string which specifies the
+// size of the argument. Useful to find if a given size contains
+// a nan value. In this case an error is issued.
+// IsNanSize = '__SCI2CNANSIZE' -> True
+// IsNanSize = 'c*__SCI2CNANSIZE' -> True
+// IsNanSize = 'c+b' -> False
+// #RNU_RES_E
+//
+// Input data:
+// instring: string to analyze.
+//
+// Output data:
+// outbool: %T if nan string has been found.
+//
+// Status:
+// 11-Feb-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+
+outbool = %F;
+indexval = strindex(instring,'__SCI2CNANSIZE');
+
+if(length(indexval)>=1)
+ outbool = %T;
+end
+
+endfunction