|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: switch vs. if... else if. More efficient?
The switch statement essentially constructs the same code as a stack of if/then/else statements.
The switch is useful because it is a way of documenting code and representing it as a 1 of n selector. This is a plenty fast processor for what you are probably going to try and do so I wouldn't worry about it. Worrying about these types of things for your i/o routines generally isn't necessary as it was say 30 years ago. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Has Being In FIRST Made You More Brave - More Confident? | JaneYoung | General Forum | 25 | 08-05-2007 10:11 |
| Who else is... | Jetgrindradio00 | General Forum | 2 | 03-03-2007 11:28 |
| Get more women to SWITCH! | Mikell Taylor | General Forum | 8 | 05-04-2006 23:30 |
| Need Help Wiring Micro Switch/Limiting Switch | Windward | Electrical | 2 | 07-02-2006 18:26 |
| Most Efficient Big Ball Getter??? Team 384 | archiver | 2001 | 18 | 24-06-2002 02:39 |