Here is a typical decision to make if ... Else the general form of the structure is used in most programming languages:
If statement:
The If statement consists of a Boolean expression followed by one or more statements. Grammar:
Syntax for an IF
One way to "make something happen" is to evaluate an expression with a side effect. Injected assignments and function calls these expressions with side-effects can be used as separate statements, and this expression is also called an expression
When programming, you often need to check a set of conditions and decide what action to take accordingly. In Python, the IF statement allows us to examine the current state of the program and take appropriate action accordingly.
5.1 A simple
When programming, you often need to check a series of conditions and decide what measures to take accordingly. In Python, the if statement enables us to check the current state of the program and take corresponding measures accordingly. 5.1 The
If ... Then ... Else statementConditionally executes a set of statements based on the value of an expression.
If condition Then statements [Else elsestatements]
Or, use block-form syntax:
If condition Then[Statements][ElseIf condition-n
An If statementifThe statement is used to test a condition, and if the condition is true, we run a block of statements (called if-blocks ), that is, there is only one if judgment, and when it is true, run a statement, otherwise it will not runThe IF
Programming | control | Statement SIXTH Chapter CONTROL statement
There is a statement that you can find in each programming language control flow statement. In this chapter, I introduce C # 's control statements, which are divided into two main
Conditional statement, which is a kind of statement that chooses to execute according to the condition in the program, the difficulty lies in how to abstract the condition accurately in the actual use of such statement. For example, to implement the
PL/SQL script language value assignment statement syntax table and record comply with the type usage, select the statement if else usage anonymous block (1), assign value statement syntax PL/SQL values use: = "=" some rules need to be observed in
Control | Statement > Sixth Chapter control statement (Rainbow translation)
Source: http://www.informit.com/matter/ser0000002
Body:
Sixth Chapter Control Statements
There is a statement that you can find in each programming language control flow
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.