blob: bb02b985481796eacc591eb89619458405d981cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
function opout = FA_SZ_FROM_VAL(in1,in2)
// function opout = FA_SZ_FROM_VAL(in1,in2)
// -----------------------------------------------------------------
// 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),2,2);
if (isnum(in1))
in1num = eval(in1) ;
if isnan(in1num)
opout = '__SCI2CNANSIZE';
elseif ( in1num < 0 )
opout= '0' ;
else
opout = string ( floor (abs(in1num))) ;
end
else
opout = in2+"0floor"+in2+"0"+"("+in1+")";
opout = in2+"0abs"+in2+"0"+"("+opout+")";
end
endfunction:
|