ASP is a programming preset in VBScript, so the ASP technology operators are running VBScript defaults, so the operator inside the ASP and VB is the same,
The ASP operators are divided into four classes of mathematics, compared to some more advanced logical operators and leftovers (those unsuitable for any category).
ASP operators
Mathematics is similar in many other programming languages to ASP operators. However, ASP technology does not support fast operators such as + +,-, + =, etc.
| Operator |
中文版 |
Example |
| Result
| + |
Addition |
MyNum = 3 + 4 |
MyNum = 7 |
| - |
Subtraction |
MyNum = 4-1 |
MyNum = 3 |
| * |
Multiplication |
MyNum = 3 * 2 |
MyNum = 6 |
| / |
Division |
MyNum = 9/3 |
MyNum = 3 |
| ^ |
Exponential |
MyNum = 2 ^ 4 |
MyNum = 16 |
| Mod |
Modulus |
MyNum = Mod 10 |
MyNum = 3 |
| - |
Negation |
MyNum =-10 |
MyNum =-10 |
|
Integer Division |
MyNum = 9 3 |
MyNum = 3 |
Comparison operators
compare two values to make a decision when the operator is in use. Comparison operator most commonly used with "if ... Then the "and" thing though is really done this point ... "Declaration, otherwise known as a conditional statement. The project is often compared with the number. As a result of comparison, the operator is true or false.
| Operator |
中文版 |
Example |
| Result
| = |
Equal to |
4 = 3 |
False |
| < |
Less Than |
4 < 3 |
False |
| > |
Greater Than |
4 > 3 |
True |
| <= |
Less Than Or Equal to |
4 <= 3 |
False |
| >= |
Greater Than Or Equal to |
4 >= 3 |
True |
| <> |
Not Equal to |
4 <>3 |
True |
logical operators
The comparison operator above results in true or false value of truth. A logical operator is used for complex statements that must be made based on the value of one or more of these truths.
| Operator |
中文版 |
Example |
| Result
| and |
Both must be TRUE |
True and False |
False |
| Or |
One must be TRUE |
True or False |
True |
| Not |
Flips Truth Value |
Not True |
False |
string operator
The only string operation is the string concatenation operator "," These two strings, and lashed them together to form a new string. One example is the string = "Tim" and the string = "is a Hero". The following code merges the two strings together into one: String3 = string and string
| Opera Tor |
中文版 |
Example |
result |
| & |
String concatenation |
String4 = "Bob" & "runs" |
String4 = "Bob runs" |