18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

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.

Appendix: Built-in Scripting Language<br />

Arithmetic functions<br />

These functions are used to perform advanced arithmetic operations and bit manipulation on numeric values.<br />

Abs<br />

Abs is a built-in scripting function that gets the absolute value of a specified numeric value.<br />

Function Group Execution Windows Embedded Thin Client<br />

Abs Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

Abs(numValue)<br />

numValue<br />

The numeric value from which the function takes the absolute value.<br />

Returned value<br />

The absolute value of the specified numeric value.<br />

Examples<br />

Tag Name<br />

Expression<br />

Tag ABS( "-54.9788" ) // Returned value = 54.9788<br />

Tag<br />

Div<br />

ABS( numValue ) // Returned value = absolute value of the number in the numValue tag.<br />

Div is a built-in scripting function that gets the dividend of two specified numeric values.<br />

Function Group Execution Windows Embedded Thin Client<br />

Div Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

Div( numNumerator, numDenominator )<br />

numNumerator<br />

The numerator of the division operation.<br />

numDenominator<br />

The denominator of the division operation.<br />

Returned value<br />

This function returns the dividend only as a whole number. The remainder is omitted.<br />

Tip: Use the Mod function to get the remainder instead of the dividend.<br />

Examples<br />

Tag Name<br />

Expression<br />

numValue Div( 100, 8 ) // Returns the value 12.5<br />

Page 534<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!