07-12-2004, 07:23 AM
We could just declare p1 and p2 as str' (then numeric to string conversion is automatic). But numbers probably must be without ". Also, variable number of arguments.
;/
function $script [VARIANT'p1] [VARIANT'p2] [VARIANT'p3] [VARIANT'p4] ;;up to p30
str s.from(script "(") ss
int i
VARIANT* a=&p1
for i 0 getopt(nargs)-1
,ss=a[i]
,sel a[i].vt
,,case [VT_BSTR,VT_DATE] s.formata("''%s''," ss)
,,case else s.formata("%s," ss)
s.rtrim(','); s+")"
;out s
run "ppbang.exe" s