Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 07-05-2016, 12:03 AM   #1
smmexpertss
Registered User
 
Join Date: Sep 2015
Location: UK
Posts: 447
The condition of a switch statement is a value. The case says that if it has the value of whatever is after that case then do whatever follows the colon. The break is used to break out of the case statements. Break is a keyword that breaks out of the code block, usually surrounded by braces, which it is in. In this case, break prevents the program from falling through and executing the code in all the other case statements. An important thing to note about the switch statement is that the case values may only be constant integral expressions.
smmexpertss is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What’s the purpose of using Break in each case of Switch Statement? Shivangi Panwar Java 3 06-06-2016 10:40 PM
Transfer Switch Market Aadolf General Discussion 1 04-02-2016 02:04 AM
Looking for a new case or cover to protect your new MacBook Air? sophia21 General Discussion 0 10-31-2012 10:52 PM
How to set up of custom html default error pages jennypretty Search Engine Optimization 1 01-03-2012 09:21 AM


All times are GMT -7. The time now is 01:39 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.