18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

Declaring <strong>VBScript</strong> Variables and Constants<br />

<strong>VBScript</strong> does not require the explicit declaration of scalar variables, i.e. those variables with only one<br />

value assigned at any given time. Arrays, Objects (except Err) and Constants must be declared. While<br />

it may initially be convenient not to declare variables, any typing (spelling) errors of the variable or<br />

constant names may produce unexpected results at runtime.<br />

<strong>VBScript</strong> Keywords<br />

<strong>VBScript</strong> has many keywords. Keywords are merely the names or symbols used with built-in <strong>VBScript</strong><br />

functions. Keywords are reserved, i.e. they may not be used by the programmer as names of variables<br />

or constants. <strong>VBScript</strong> keywords can be grouped into categories which include:<br />

• Constants & Literals<br />

• Operators<br />

• Functions<br />

• Statements<br />

• Objects<br />

Operators<br />

<strong>VBScript</strong> defines various operators that per<strong>for</strong>m operations based on the Variant subdata type(s).<br />

Arithmetic operators are used to per<strong>for</strong>m operations on two or more numbers.<br />

Arithmetic Comparison<br />

Symbol Definition<br />

+ Add<br />

- Subtract<br />

* Multiply<br />

/ Divide<br />

\ Integer Divide<br />

^ Exponentiation<br />

MOD Modulus Division<br />

Logical String<br />

Symbol Definition<br />

AND And<br />

OR, | Or<br />

XOR Exclusive OR<br />

Eqv Equivalence<br />

Imp Implication<br />

Not NOT<br />

Object IWS<br />

Symbol Definition<br />

Is Is (compare)<br />

Symbol Definition<br />

< Less than<br />

Greater than<br />

>= Greater than or equal<br />

= Equal or assignment<br />

Not equal<br />

Symbol Definition<br />

&, + Concatenation<br />

Symbol Definition<br />

$ Access to IWS Tags and Built-in functions<br />

14 <strong>InduSoft</strong>, Ltd.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!