First, ifSyntax format: If test-d $arg then ... else ... fiVariable test statements can be simplified with []. Example: test-d $arg equivalent to [-D $arg]. (Note: "Space" ["Space"-D "space"])For more test commands see: http://www.cnblogs.com/fangwu/
1. Select the control statement--GrammarIFConditions Thenstatement;END IF;DECLAREv_salary Number(8,2);BEGIN SELECTSalary intov_salary fromauthsWHEREName='Zhang San'; IFV_salary is not NULL ThenDbms_output. Put_Line (v_salary); END
Php process control statement. Php process control statements conditional control statements and cyclic control statements are two basic syntax structures. They are all used to control the program execution process and constitute the main syntax
This is a creation in
Article, where the information may have evolved or changed.
1. Basic knowledge Supplement (pointer, increment decrement statement)
Pointer
Go retains pointers, but unlike other programming languages, pointer operations
This is a creation in
Article, where the information may have evolved or changed.
If statement
i f x > 0 { // {是强制的,且必须和if在同一行 return y} else { return x}
If and switch accept initialization statements, which are typically used to set a (local)
This is a creation in
Article, where the information may have evolved or changed.
If a: = 1; A > 1 {//define variable A,a only valid in the IF statementFmt. Println ("a > 1")} else {If a: = 10; A > 1 {Fmt. Println (a)//result is 10, and C variable
1 For example, Python advocates simple and practical thinking, it does not have a switch statement, if you want to implement the switch statement effect
There are 2 ways to write a
(1) through the IF Elif statement to achieve
If condition:
...
Elif
The jump statement is used to change the execution process of the program and transfer it to the specified place. C # contains 4 medium jump statements, as shown in: 1. The Break statement can use the Break statement to terminate the current loop or
Switch statement
If you want to selectively execute one of several code blocks, use the Switch statement.
Use the Switch statement to avoid lengthy code blocks such as if... elseif... else.
Syntax
switch (expression){case label1: code to
I. IF-THEN statement
The IF-THEN statement is the simplest IF statement.
Syntax:
condition ;
Example:
: v_score ;II. IF-THEN-ELSE statement
Compared with the IF-THEN statement, the IF-THEN-ELSE statement provides program exceptions when the
1. If statement
An If statement is an important feature in most languages, and it executes program segments based on conditions. The IF statement in PHP is similar to C:
if (expr)
Statement
As discussed in the expression, expr is computed as
1. If statement
An If statement is an important feature in most languages, and it executes program segments based on conditions. The IF statement in PHP is similar to C:
if (ExPR)
Statement
As discussed in the expression, expr is computed as
Many friends often ask about the usage of Flash script statements. Some simple commands can implement some functions. Now I will explain the basic usage of some commonly used flash action statements.
1. Goto: Jump to a specified frame)Scene:
Control statement
The following three methods are commonly used. A lower-case string represents a control command, while a lower-case string represents other meanings.1. If test then commands Elif test then commands fi2. for VAR in list do
Http://www.cnblogs.com/way_testlife/archive/2010/06/14/1758276.html
# First: Calculate the prime number between 50 and 100.
Import mathFor I in range (50,100 + 1 ):For J in range (2, INT (math. SQRT (I) + 1 ):If I % J = 0:BreakElse:Print I
#
1. If statement
If statements are an important feature of most languages. They are executed based on conditions.Program. PHP's If statement is similar to C:
If (expr)
Statement
As discussed in the expression, expr is calculated as its true
Declare Grade varchar2 (2 ); Begin Grade: = '& Grade' ; Case When Grade = 'A' Then Dbms_output.put_line ( 'Excellent' ); When Grade = 'B' Then Dbms_output.put_line ( 'Excellent' ); When Grade = 'C' Then Dbms_output.put_line ('Good' );
1. The Function Definition Format in shell is:
Function name (){
# Function body
}
The function definition must follow the principle first defined in use, such as defining the function print
#!/bin/shfunction print(){if [ $# -lt 1 ]then print “no
Java Process Control statementsPublic class Demo2 {Public static void main (String [] args ){// If statement usage: mostly used for range judgmentInt x = 3;Int y = 10;System. out. println (=== comparison start === );If (x> y ){System. out. println
Talk not much, directly on the dry goods ...One: Process Control statementsBreak: Ends the current loopContinue: End this cycle and continue the next cycleReturn: End methodTwo: Methods1. Features of the method:A function defined in a class that has
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.