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>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

The And operator also per<strong>for</strong>ms a bitwise comparison of identically positioned bits in two numeric<br />

expressions and sets the corresponding bit in result according to the following table:<br />

If bit in expression1 is And bit in expression2 is Then result is<br />

0 0 0<br />

0 1 0<br />

1 0 0<br />

1 1 1<br />

Example: Dim pump_on<br />

Dim valve_closed<br />

If ( (pump_on = True) And (valve_closed = True)) then pump_on = False<br />

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

b = 4 ‘ b = 4 (bits 0000 0000 0000 0100)<br />

c = a And b ‘ c = 4 (bitwise AND operation)<br />

Assignment Operator (=)<br />

Description Used to assign a value to a variable or a property.<br />

Usage variable = value<br />

Arguments variable<br />

Any variable or writable property.<br />

value<br />

Any numeric or string literal, constant or expression.<br />

Remarks The name on the left side of the equal sign can be a simple scalar variable or an element of an<br />

array. Properties on the left side of the equal sign can only be those properties that are writeable<br />

at runtime.<br />

See also Comparison Operator, Set Statement<br />

Example: a = 5<br />

b = 6<br />

c = a + b ‘ Variable c is now 11<br />

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

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

Saved successfully!

Ooh no, something went wrong!