summaryrefslogtreecommitdiff
path: root/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
diff options
context:
space:
mode:
authorsimon2009-08-06 14:00:00 +0000
committersimon2009-08-06 14:00:00 +0000
commitc76ca1b96e718c7ebfa986be8bf67663a2c468ae (patch)
tree7ffe277a1d9b856aeb127b486bdeb7c412968184 /macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
parent2cb32557766c38f6776c25f701c0935f76cf3c6d (diff)
downloadscilab2c-c76ca1b96e718c7ebfa986be8bf67663a2c468ae.tar.gz
scilab2c-c76ca1b96e718c7ebfa986be8bf67663a2c468ae.tar.bz2
scilab2c-c76ca1b96e718c7ebfa986be8bf67663a2c468ae.zip
added FA_SZ_FROM_VAL to handle functions who determine the size of the ouput with the input arguments
updated INIT_FillSCI2LibCDirs
Diffstat (limited to 'macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci')
-rw-r--r--macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci26
1 files changed, 26 insertions, 0 deletions
diff --git a/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
new file mode 100644
index 00000000..e9d88650
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci
@@ -0,0 +1,26 @@
+function opout = FA_SZ_FROM_VAL(in1)
+// function opout = FA_SZ_FROM_VAL(in1)
+// -----------------------------------------------------------------
+// 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),1,1);
+
+in1num = eval(in1) ;
+
+if ( in1num < 0 )
+ opout= '0' ;
+else
+ opout = string ( floor (abs(in1num))) ;
+end
+
+
+
+endfunction