|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Nesting CASE in IF ( or ) Nesting IF in CASE
Does anybody knows some theoretical info on the problem when I have CASE and IF but I don't know what to check first. Should I first make CASE statement, and then in every CASE a lot of IF's or the second approach: first IF and then CASE? How to decide when to do what? |
| Sponsored Links |
|
|
|
|||||
|
Generally, you do whichever is most appropriate for the particular situation. If you will need to place an IF in every case option, there may be a way to refactor things. Of course, the ideal situation is to find a way to handle the IF either before or after the CASE, using the results of one in the other.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Programming is a branch of mathematics. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial - Smarterchild copy | travy92 | VB Tutorials | 19 | 09-25-2008 07:05 PM |
| Assign a keyboard key to a JButton. | gszauer | Java Help | 4 | 01-08-2008 03:09 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%