Appendix: Built-in Scripting Language Arithmetic functions These functions are used to perform advanced arithmetic operations and bit manipulation on numeric values. Abs Abs is a built-in scripting function that gets the absolute value of a specified numeric value. Syntax Abs( numValue ) numValue The numeric value from which the function takes the absolute value. Returned value The absolute value of the specified numeric value. Examples Div Div is a built-in scripting function that gets the dividend of two specified numeric values. Syntax Div( numNumerator , numDenominator ) numNumerator The numerator of the division operation. numDenominator The denominator of the division operation.
Returned value This function returns the dividend only as a whole number. The remainder is omitted. Tip: Use the Mod function to get the remainder instead of the dividend. Examples Page 446 InduSoft Web Studio Function Group Execution Windows Embedded Thin Client Abs Arithmetic Synchronous Supported Supported Supported Tag Name Expression Tag ABS( "-54.9788" ) // Returned value = 54.9788 Tag ABS( numValue ) // Returned value = absolute value of the number in the numValue tag.
Function Group Execution Windows Embedded Thin Client Div Arithmetic Synchronous Supported Supported Supported Tag Name Expression numValue Div( 100, 8 ) // Returns the value 12.5 numValue Div( 16, 4 ) // Returns the value 4 numValue Div( 100, 12.5 ) // Returns the value 8