Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many CASEs in DO CASE?
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01126584
Message ID:
01126586
Views:
32
Usually if there are so many cases it looks like either some table needs to be created or there is a problem in the logic that has to be addressed.

>Is there a limit on number of CASEs can be in a DO CASE?
>
>If your DO CASE involves a large number of CASEs (say several hundred), is it faster to do CASE on a numeric comparison or a character? For example:
>
>
>nVar = 3
>do case
>   case nVar = 1
>
>   case nVar = 2
>* and so on
>endcase
>
>* vs.
>cVar = "3"
>do case
>   case nVar = "1"
>
>   case nVar = "2"
>* and so on
>endcase
>
>
>Thank you.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform