18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Appendix: Built-in Scripting Language<br />

Operator Usage Description<br />

= 1100 (decimal 12)<br />

Tip: For more complex logic, try the Logical and Loop functions.<br />

Arithmetic operators<br />

Operator Usage Description<br />

+ X + Y Add (plus)<br />

- X - Y Subtract (minus)<br />

* X * Y Multiply by<br />

/ X / Y Divide by<br />

Arithemtic operators are resolved from left to right according to the standard order of evaluation. To change<br />

the order, enclose in parentheses the part of the equation to be resolved first. For example, the following<br />

equation produces a result of 11 because multiplication is evaluated before addition; the equation multiplies 2<br />

by 3 and then adds 5 to the result:<br />

5+2*3<br />

In contrast, if you use parentheses to change the syntax, 5 and 2 are added together and then multiplied by 3<br />

to produce 21:<br />

(5+2)*3<br />

Tip: For more complex math, try the Arithmetic, Statistical, Logarithmic and Trigonometric<br />

functions.<br />

Page 530<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!