General information
Category:
Coding, syntax & commands
>My initial thought was I should get an error on the call to squareit(), since I am passing a character type when it expects a double. But the error doesn't happen until I perform the calculation. This isn't right! If the caller screws up the function call, I want the error to originate there, not buried in the well-debugged function!
>
>I haven't noticed this before because I assummmed FoxPro was enforcing my explicit type. Am I doing something wrong, or is this just one of FoxPro's quirks?
>
>Using VFP 9, no service pack...
>
In my view, this is what ASSERT is for. You can give the developer a meaningful message. Of course, you still need error-checking at runtime.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only