Select the work of the report, if the statement. The difference, however, is that they can check for multiple values. Of course, you have
Many of the same, if. Else statement, but this is not always the best method.
The SELECT statement allows a program to evaluate the expression and attempt to match the value of the expression to the case label. If you find a horse
With, the program executes the related declaration. The syntax for the SELECT statement is as follows:
Select Case Expression
Case Label_1
Statements_1
Case Label_2
Statements_2
...
Case Else
Statements_n
End Select
The plan first looks for the case with the value tag of the matching expression, and then the control shifts to the clause, performing the phase
Off the statement. If no matching tag is found, the program looks for the optional ELSE clause and, if found, controls
Transfer to the clause and execute the relevant statement. If no case Else clause is found, the declaration that the program continues to execute
End after selection. Use the rest time to avoid automatic execution by entering the next code.
Let's consider an example:
<%@ language= "VBScript" >
<%
Dim Flower
Flower = "Rose"
Select Case Flower
case "Rose"
Response.Write (Flower & "costs $2.50")
Case "Daisy"
Response.Write (Flower & "costs $1.25")
case "Orchild" Response.Write (Flower & "costs $1.50")
Case Else
; Response.Write ("There is no such flower into our own shop")
End Select
%>