Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CASE statements
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00838740
Message ID:
00841728
Views:
32
>"rather see" should not be a legitimate excuse for a coding practise that is a corruption of intended and expected usage of a programming construct.
>
>Just because I **CAN** cross the street without looking for traffic, it remains a stupid/silly/dumb/crazy/... thing to do.
>So it is with CASE. Who are you helping by coding this way?? If the answer is yourself, then it is the wrong answer. Similarly if you are doing it because you hate compound (or nested) IFs. Similarly if you are doing it because you hate typing.
>

You're helping both yourself, and any developer who has to adjust/fix/read the code later. With a comment, the code makes a LOT more sense and is by far easier to read (and you're less likely to screw up the logic) than a ton of nasty nested IF statements. If the behavior of the DO CASE wasn't clearly documented, then I >might< agree with you. But, it's pretty clear - the behavior you're seeing isn't the byproduct of some sort of "hidden" functionality (like when we do a SELECT/GROUP BY w/o including all the fields). It works exactly the way it says it should work.

I don't care about "too many lines of code" in and of itself. I do care when the number of lines, or nesting of the code makes the code unclear or easy to mistype.

>
>CASE was clearly not invented for this kind of usage! Anyone who does so really is doing the busines of VFP programming a disservice IN MY OPINION!
>

Your opinion.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform