Optional parameter in function as a string

This is very basic, but I am stuck. I wrote some code where I have two string parameters and now I want to make the second of these optional to give users the option of running the code using only one string instead of requiring two. Running one string is OK, but I get an error with two.

If I do:
Function DoIt(a,[b])
    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?
Try calling your function using
DoIt("terry", b="june")


Regards,
Kurt
I might add that the usual way to test for the presence of the optional parameter is with the ParamIsDefault function. So your function might look like
Function DoIt(a,[b])
    string a,b
    Print a
    if(!ParamIsDefault(b))
        Print b
    endif
End


John Weeks
WaveMetrics, Inc.
support@wavemetrics.com