Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thundering Train Programming
Message
De
19/01/2006 16:28:02
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
19/01/2006 15:49:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01088463
Message ID:
01088663
Vues:
26
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform