diff options
-rw-r--r-- | macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci | 26 | ||||
-rw-r--r-- | macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 6 |
2 files changed, 29 insertions, 3 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 diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 2de3fadb..0aac9f18 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -493,8 +493,8 @@ PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); //Was FA_TP_USER //Cause some trouble if user specify some precision and if input(and also output) is complex. PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(1)= IN(1).VAL',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FROM_VAL(IN(1).VAL)',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(IN(2).VAL)',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); @@ -2057,7 +2057,7 @@ PrintStringInfo('NIN= 3',ClassFileName,'file','y'); PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(IN(1).VAL)',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(FA_SZ_FROM_VAL(IN(1).VAL))',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); |