Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

Operators Overview

If you are familiar with C, C++, Java, or JavaScript, you probably already know what most of the DScript operators do. However, DScript includes some operators not found in other languages.

The following table presents all DScript operators in groups from highest to lowest precedence. A detailed description of each operator follows in the remainder of this chapter.

Name Symbol Associativity

_________________________________________________

Procedure {x,y,...} Left to Right

Parentheses (x,y,...)

List Literal [x,y,...]

List Element x[y]

Quote "x", 'x'

Plus +x

Minus -x

Do Primitive @x

_________________________________________________

Property x.y Left to Right

Function Call x()

Implied Multiply ky

_________________________________________________

Range x..y Left to Right

_________________________________________________

Subscript x#y Left to Right

Value Of ?x

Percent x%

_________________________________________________

Increment x++, ++x Right to Left

Decrement x--, --x

Bitwise Not ~x

Logical Not !x

Factorial x!

delete delete x.y

new new x()

typeof typeof x

void void x

_________________________________________________

Power x^y Left to Right

_________________________________________________

Multiply x*y Left to Right

Divide x/y

Remainder x%y

_________________________________________________

Add x+y Left to Right

Subtract x-y

List Concatenate x!!y

_________________________________________________

Left Shift x<<y Left to Right

Right Shift x>>y

Zero-Fill Right Shift x>>>y

_________________________________________________

Greater Than or Equal x>=y Left to Right

Less Than or Equal x<=y

Greater Than x>y

Less Than x<y

_________________________________________________

Equal x==y Left to Right

Not Equal x!=y

_________________________________________________

Bitwise And x&y Left to Right

_________________________________________________

Bitwise Exclusive Or x~y Left to Right

_________________________________________________

Bitwise Or x|y Left to Right

_________________________________________________

Logical And x&&y Left to Right

_________________________________________________

Logical Or x||y Left to Right

_________________________________________________

Conditional x?y:z Right to Left

_________________________________________________

Assign x=y Right to Left

Compound Assignment x^=y

x*=y

x/=y

x%=y

x+=y

x-=y

x<<=y

x>>=y

x>>>=y

x&=y

x~=y

x|=y

Object Literal {p1:x,p2:y,...}

_________________________________________________

Accumulate x->y Left to Right

_________________________________________________

Define x:=y Right to Left

_________________________________________________

See Also

Operator Precedence

Operator Associativity

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend