lparameter tcEmpno
May crash if there is a table open with a field named "tcEmpno". I mean if you're going to list the assumptions, might as well add the lack of mdot involves a big assumption.
>>Interesting! It also assumes there is no field called tcEmpno at the lParameter line. ;) That's a tough one to debug too!
>
>Huh? Oh sorry. My first remark (
It assumes a chartype parameter is indeed passed) is about the lparameter line, not about the 'do someroutine' line.
>
>>I've taken to doing a vartype on the parameters and issuing an error if the checks fail.
>
>Yes, but suppose the specs say that there will always be a character value passed...
If I write code for other programmers to use, I can't be sure they will pass the parameters properly. If I
?SQRT("X")
VFP does give an error. What should my code do if you improperly pass parameters?