>You assigned the init to receive a parameter. When no parameters are passed the routine will assume the parameter value is .F., thereform pcount() = 1
>Test for a valid parameter instead. something like
>if VARTYPE("lcstkno") # "C"
> return .F.
>endif
Quote from "Hacker's Guide":
"Parameters(), PCount()
These functions tell you how many parameters were
passed to a procedure or function", so pcount() will give 0 if none are passed.
With more parameters, it's easier and cleaner to do some checking for each one and provide defaults (just like you suggested).