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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Multiplication Operator (*)<br />

Description Multiplies two numbers<br />

Usage result = number1 * number2<br />

Arguments result<br />

Any numeric variable.<br />

number1<br />

Any valid numeric expression.<br />

number2<br />

Any valid numeric expression.<br />

Remarks If one or both expressions are Null expressions, result is Null. If an expression is Empty, it is<br />

treated as if it were 0.<br />

See also Division Operator (/), Integer Division (\)<br />

Example: Dim A, B, C<br />

A = 2 : B = 3<br />

C = A * B ‘ The result C is equal to 6<br />

Not Operator (Not)<br />

Description Per<strong>for</strong>ms a logical Not on an expression<br />

Usage result = Not expression<br />

Arguments result<br />

Any variable.<br />

expression<br />

Any valid expression<br />

Returns A logical True or False<br />

Remarks The following table illustrates how result is determined:<br />

If expression is Then result is<br />

True False<br />

False True<br />

Null Null<br />

In addition, the Not operator inverts the bit values of any variable and sets the corresponding bit<br />

in result according to the following table:<br />

Bit in expression Bit in result<br />

0 0<br />

1 1<br />

See also AND Operator, OR Operator, XOR Operator<br />

Example: Dim cond1, cond2, a<br />

cond1 = True<br />

cond2 = Not cond1 ‘ cond2 set to False<br />

Example a = 5 ‘ a = 5 (bit 0000 0000 0000 0101)<br />

a = Not a ‘ a = -6 (bit 1111 1111 1111 1010)<br />

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

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

Saved successfully!

Ooh no, something went wrong!