Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO CASE vs IF
Message
From
27/12/2000 19:56:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DO CASE vs IF
Miscellaneous
Thread ID:
00457199
Message ID:
00457199
Views:
71
Hi All:

Feeling that IF's are faster than DO CASES, thought I'd ask.

Besides code readability, do you see any problems by replacing DO CASE with IF's.?

DO CASE
..CASE x="whatever1"
.....DO something
..CASE x="whatever2"
.....DO something
.....
..CASE x="whatever24"
.....DO something
ENDCASE
RETURN

.OR.

IF x="whatever1"
..DO something
..RETURN
ENDIF

IF x="whatever2"
..DO something
..RETURN
ENDIF

.......

IF x="whatever24"
..DO something
..RETURN
ENDIF

Mal
Next
Reply
Map
View

Click here to load this message in the networking platform