Program flow control Statements in Java include conditional structure, loop structure, and jump statements4.1-Piece structureThe conditional structure includes the sequential structure and the selection structure. The sequential structure does not
4.2 Item Selection Statements"Teacher, did I pass the level four exam?" ”If the teacher is asked this question, how will he answer? Yes, he will choose different answers according to different conditions:If the test result is greater than or equal
4.2 Item Selection Statements"Teacher, did I pass the level four exam?" ”If the teacher is asked this question, how will he answer? Yes, he will choose different answers according to different conditions:If the test result is greater than or equal
3 forms of an IF statement
1 an if (expression) statement.
For example:
if (x>y) cout
The execution of this if statement is shown in the following figure.
2 if (expression) statement 1 Else Statement 2
For example:
if (x>y)
Conditional comments work as follows:
Copy codeThe Code is as follows: Special instructions for IE 6 here
[Code]
Their basic structure is the same as an HTML comment (). Therefore all other browsers will see them as normal comments and will
Mind Mapping
Click on the image below to view the larger image.
Introduced
Conditional logic can be very complex, so this chapter provides some refactoring techniques that are designed to simplify them.
Full
Conditional comments work as follows:
Copy Code code as follows:
special instructions for IE 6 here
[Code]
Their basic structure is the same as a HTML comment (). Therefore all other browsers would you them as normal comments and
If statement
The IF statement can be used to form a branch structure that is judged according to the conditions given to determine which branch segment to execute.
There are three basic forms of if statements in C language
The first form of:
I have learned C language and C ++ for three years, but I still don't know much about Conditional compilation commands. I can see some excellent source code on the Linux platform, such as uC/OS-II used a lot of compilation instructions, MFC also
The IE conditional comment is a special HTML comment that can only be understood by IE5.0 and later. For example, ordinary HTML annotations are:And only IE-readable IE conditional annotations are: "Non-IE conditional comment":--> Non-ie HTML Code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.