Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Operators
OPERATORS: =
The basic assignment operator is the equal sign, which assigns the value (literal or variable) on its right to the variable on its left:
Code:
x = a;
The assignment operator can also be combined with a variety of other operators to provide shorthand versions of standard operations. It combines with the arithmetic operators
+
,
-
,
*
,
/
and
%
to give the following shorthand versions:
a += b
instead of
a = a + b
a -= b
instead of
a = a - b
a *= b
instead of
a = a * b
a /= b
instead of
a = a / b
a %= b
instead of
a = a % b
It also combines with the following bitwise operators:
a <<= b
instead of
a = a << b
a >>= b
instead of
a = a >> b
a >>>= b
instead of
a = a >>> b
a &= b
instead of
a = a & b
a ^= b
instead of
a = a ^ b
a |= b
instead of
a = a | b
NOTE:
If the operand to the left of the equal sign itself contains an assignment operator, then the above shorthand statements won't work. Instead you must use the longer version of the statement.
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information