Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How much of your code do you test?
Message
De
21/11/2002 08:36:14
 
 
À
18/11/2002 13:30:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00721300
Message ID:
00725111
Vues:
12
>>>Your point (b) I simply don't understand. Code that 'cannot be reached' CAN BE REMOVED without consequence.
>>
>>You sure about that? Are you 100% sure you've proven the negative statement that "the code cannot be reached"?
>
>First, I only used the phrase that you used. Secondly, if I couldn't prove that some code could not be reached, then it would have to stay in. I guess you mean to suggest that one cannot prove a negative. I don't think that's applicable in the case stated (I *can* prove that the earth is not square and I *can* prove that a person cannot walk around the earth on the equator line).

Jim - I think you're missing Mike's point. Good programming practice says that, for example, every CASE has an OTHERWISE, even if you believe you've enumerated all possibilities in the other cases. There's no way to test that OTHERWISE case, but it's better code to have it there than to remove it.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform