Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking Parameters
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01108949
Message ID:
01109001
Vues:
21
VFP checks parameter types. Try passing an integer for the 1st parameter of SUBSTR().

In the case of a COM object I write in VFP, the programmers ARE the users, so I think
you would need to check.

I'm just trying to be complete. I don't want a COM object I pass to other programmers
to crash instead of handling it up front. At the same time, I don't want to overly
complicate the code either.





>I don't check that. It's not a user problem. It's a programmer problem. I just let the standard error message be thrown. If the programmer can't check the documentation to determine the proper data type, then pass it, there's a bigger issue going on.
>
>
>>So assuming you are expecting a string parameter, and the user passes a number,
>>what do you do.
>>
>>Optional or not, all params need to have their type checked.
>>
>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform