Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-2008, 08:16 AM
pino pino is offline
Newbie
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
pino is on a distinguished road
Default Nesting CASE in IF ( or ) Nesting IF in CASE

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-15-2008, 05:19 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,278
Last Blog:
wxWidgets is NOT code ...
Rep Power: 36
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

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


All times are GMT -5. The time now is 06:53 PM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads