Optional parameter in function as a string
sjr51
If I do:
Function DoIt(a,[b])
string a,b
Print a
if(numtype(strlen(b)) != 2)
Print b
endif
End
string a,b
Print a
if(numtype(strlen(b)) != 2)
Print b
endif
End
and I try to call
DoIt("terry","june")
. I get an ill-formed name error. Calling DoIt("terry")
is OK. Looking through help I can only see references to optional parameters being numeric variables. Is it possible to do this with a string? What am I doing wrong?
Regards,
Kurt
October 7, 2016 at 04:41 am - Permalink
October 7, 2016 at 04:52 am - Permalink
string a,b
Print a
if(!ParamIsDefault(b))
Print b
endif
End
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 10, 2016 at 09:51 am - Permalink