Create an ASP program ASP is a text file with the extension. asp, including text, HTML statements, ASP commands, and other scripting languages.
ASP commands must be placed between "<%" and "%>"
Program Annotation In order to develop a good programming style, moderate comments are indispensable. ASP provides two comments
1. But the quotation marks () are considered as comments in this line after the single quotation marks.
2. rem keywords. The text after REM is considered as comments.
Assignment Statement
In ASP, the value assignment statement of a common variable is "="
Objects are assigned values using the set statement.
Arithmetic Operators
| Operator |
Function |
| + |
ID |
| - |
Negative number |
| + |
Addition |
| - |
Subtraction |
| * |
Multiplication |
| / |
Division |
| \ |
Integer Division |
| Mod |
Remainder |
| ^ |
Index |
Relational operators
| Operator |
Function |
| = |
Equal |
| <> |
Not equal |
| < |
Less |
| > |
Greater |
| <= |
Less than or equal |
| > = |
Greater than or equal |
| IS |
Whether the comparison variable points to the same object |
Logical operators The logical operators of ASP include:
1. NOT reverse the logic Value
2. AND "AND" or "AND" operations
3. OR "OR" Operation
4. XOR "exclusive or" operation
5. EPV determines that the two expressions have equal logic and the same result is true. Otherwise, the two expressions are false.
6. IMP checks whether two expressions are logically related.
String Operators ASP has only one string operator, which can force two expressions to connect strings.
Variable Declaration Note that
1. The valid variable name cannot exceed 255 characters
2. The variable name must start with a letter.
3. The variable name must be unique within the same valid range.
Variable declaration DIM variable name
Constant statement CONST constant name = constant value
Data Type For ASP, it only has one Variant (Common variable) data type, which is a very special data type. You can specify any data type to this variable, such as Boolean, byte, integer, long integer, single-precision floating point, double-precision floating point, currency, date, and so on.