>Hi all,
>
>I am going to myself guess that the answer to this next question is a "no" based upon my testing but just in case I am wrong here goes...
>
>- can a parameter default to null if not passed to a function or procedure e.g.
>
>
>LPARAMETERS tlUseExistingServer
>
>
>I tried
>
>
>LPARAMETERS tlUseExistingServer AS BOOLEAN NULL
>
>
>But that just lets me store .null. to the parameter after it has been passed. I know you can use PCOUNT() or PARAMETERS() to test if something passed but that does not work so well if you want to pass *some* parameters but not others and you still want to know if something has been passed or not.
>
>Thanks,
>Albert
You can do that indirectly without using pcount() or parameters() (I seldom use them). When you don't pass a parameter, by "default" it is boolean false or simply empty() - in VFP .F. is empty.
Thus you could do this:
parameters tuSomeParameter
tuSomeParameter = evl(m.tuSomeParameter, .null.)