Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hate Nested IFs? Consider this...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01086217
Message ID:
01086512
Vues:
21
>So, if I read that properly. You are saying that one HAS to be DRUNK AND TIRED to drive the car??? No wonder there are so many accidents on the road... ;)
>
>Chad

Wow, you're right! And all the others haven't noticed that before! We must be really lousy reviewers. :)

>>To me, this looks like the standard checklist approach:
>>
lCanDrive=.f.
>>do case
>>   case not this.HaveCar()
>>   case not this.HaveLicense()
>>   case not this.drunk()
>>   case not this.tired()
>>   case not this.car.tank.empty()
>>   ...
>>   otherwise
>>   lCanDrive=.t.
>>endcase
>>
>>So, if someone doesn't have a car or a license, we don't care whether he has had a drink or two, and we surely won't check the tank in a car he doesn't have.
>>
>>I don't see anything wrong with this approach, on the condition that the method names are meaningful.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform