please dont rip this site
Microsoft® Visual Basic® Scripting Edition
VBScript Operators
Using VBScript |
Previous | Next |

 

Operator Precedence
VBScript has a full range of operators, including arithmetic operators, comparison operators, concatenation operators, and logical operators.

When several operations occur in an expression, each part is evaluated and resolved in a predetermined order. That order is known as operator precedence. You can use parentheses to override the order of precedence and force some parts of an expression to be evaluated before others. Operations within parentheses are always performed before those outside. Within parentheses, however, normal operator precedence is maintained.

When expressions contain operators from more than one category, arithmetic operators are evaluated first, comparison operators are evaluated next, and logical operators are evaluated last. Comparison operators all have equal precedence; that is, they are evaluated in the left to right order in which they appear. Arithmetic and logical operators are evaluated in the following order of precedence.

Arithmetic Comparison Logical
Description Symbol Description Symbol Description Symbol
Exponentiation ^ Equality = Logical negation Not
Unary negation - Inequality <> Logical conjunction And
Multiplication * Less than < Logical disjunction Or
Division / Greater than > Logical exclusion Xor
Integer division \ Less than or equal to <= Logical equivalence Eqv
Modulus arithmetic Mod Greater than or equal to >= Logical implication Imp
Addition + Object equivalence Is    
Subtraction -        
String concatenation &        
When multiplication and division occur together in an expression, each operation is evaluated as it occurs from left to right. Likewise, when addition and subtraction occur together in an expression, each operation is evaluated in order of appearance from left to right.

The string concatenation operator (&) is not an arithmetic operator, but in precedence it does fall after all arithmetic operators and before all comparison operators. The Is operator is an object reference comparison operator. It does not compare objects or their values; it checks only to determine if two object references refer to the same object.


© 1996 by Microsoft Corporation.
file: /Techref/language/asp/VBS/VBSCRIPT/5.htm, 7KB, , updated: 1996/11/22 11:12, local time: 2024/3/29 04:21,
TOP NEW HELP FIND: 
44.197.195.36:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.sxlist.com/techref/language/asp/VBS/VBSCRIPT/5.htm"> Operators - Microsoft&#174; Visual Basic&#174; Scripting Edition</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to www.sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .