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
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
If... Then... Else statement
Execute a group of statements conditionally based on the expression value.
If condition Then statements [Else elsestatements ]
Alternatively, use the block Syntax:
If condition Then[statements][ElseIf condition-n
From http://www.cnblogs.com/ggjucheng/archive/2012/12/16/2820834.html
English from http://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html
If-then statement
If-then statements are the most basic control flow statements. It
In php, if else or switch statements are used most frequently, next, I will give you a detailed introduction to my notes on using the if else Conditional Control statement in php. if you need it, please refer to it.
In php, the basic process control
The code we see earlier is executed sequentially, that is, the first statement is executed first, then the second, the third ... Until the last statement.
However, in many cases, sequential structure of the code is far from enough, such as a
SQL statement case when then else end returns a qualified value, sqlcase
Case has two formats
Simple Case functions and Case search functions:
-- Simple Case function CASE sex WHEN '1' then' male 'when' 2' then' female 'else' other 'ends -- Case
How to Use the if... else statement in Lua
This article mainly introduces how to use the if... else statement in Lua. It is the basic knowledge of Lua beginners. For more information, see
The if statement can be followed by an optional else
This article mainly introduces the usage of the IF ... else statement in Lua, which is the basic knowledge in Lua's introductory learning, and can be consulted by a friend.
An If statement can be followed by an optional else statement, when the
If,elseIf if, else is another meaning, if the condition is determined within the parentheses, if the condition is met, the IF statement executes the command and if it does not, the IF statement is not entered.The basic format:①if (...) Conditions
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.