08-30-2014, 05:20 PM
I come up with this but then there are almost 2 identical "sel" statements:
Function Function12
Is there anyway to combine the 2 select statements into one?
Function Function12
function `v `v2;;` is for VARIANT;
;Can pass string or array or int etc, don't need multiple parameters.
;outx v.vt
ARRAY(int)& a
str s
sel v.vt
,case VT_I4|VT_ARRAY
,,a=v.parray
,,;do somethine with a
,
,case VT_BSTR
,,s=v
,,;do something with s
,
,case else end ERR_BADARG
sel v2.vt
,case VT_I4|VT_ARRAY
,,a=v2.parray
,,;do somethine with a
,
,case VT_BSTR
,,s=v2
,,;do something with s
,
,case else end ERR_BADARG