ASP — Operators
Arithmetic Operators
| Operator | Description | Example |
|---|---|---|
| + | Addition | 5 + 3 |
| - | Subtraction | 5 - 3 |
| * | Multiplication | 5 * 3 |
| / | Division | 5 / 3 |
| \ | Integer division | 5 \ 3 |
| Mod | Modulus | 5 Mod 3 |
| ^ | Exponent | 5 ^ 3 |
Comparison Operators
| Operator | Description |
|---|---|
| = | Equal |
| <> | Not equal |
| < | Less than |
| > | Greater than |
| <= | Less or equal |
| >= | Greater or equal |
Logical Operators
| Operator | Description |
|---|---|
| And | Logical AND |
| Or | Logical OR |
| Not | Logical NOT |
| Xor | Exclusive OR |
String Operator
<%
Dim str1, str2, result
str1 = "Hello"
str2 = "World"
result = str1 & " " & str2
Response.Write(result)
%>
Mini Practice
- Use arithmetic operators
- Use comparison operators
- Use logical operators
- Concatenate strings
Up Next
Continue with Conditions — conditional statements.
Related Topics
Frequently Asked Questions about Operators
What is Operators in ASP?
Operators is a fundamental concept in ASP. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Operators?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Operators.
Why is Operators important in ASP?
Operators is essential for ASP development. Understanding this concept will help you write better code and solve real-world problems more effectively.