Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thundering Train Programming
Message
From
19/01/2006 16:28:02
Mike Yearwood
Toronto, Ontario, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01088463
Message ID:
01088663
Views:
28
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform