TestIT:Programming Math

From Nolek Wiki
Jump to navigation Jump to search

5.3.5 Math

Add

Description:
It will add two numbers.

Code example:

Math.Add(_D01,1,3)
Parameters
Parameter Type Description
Result Int symbol or Double symbol Symbol to receive result
Value1 Int, Double, Int symbol or Double symbol Value or symbol to use
Value2 Int, Double, Int symbol or Double symbol Value or symbol to use

Subtract

Description:
It will subtract one number from another.

Code example:

Math.Subtract(_IN01,4,3)
Parameters
Parameter Type Description
Result Int symbol or Double symbol Symbol to receive result
Value1 Int, Double, Int symbol or Double symbol Value or symbol to use
Value2 Int, Double, Int symbol or Double symbol Value or symbol to use

Divide

Description:
It will divide two numbers.

Code example:

Math.Divide(_D01,4,2)
Parameters
Parameter Type Description
Result Int symbol or Double symbol Symbol to receive result
Value1 Int, Double, Int symbol or Double symbol Value or symbol to use
Value2 Int, Double, Int symbol or Double symbol Value or symbol to use

Multiply

Description:
It will multiply two numbers.

Code example:

Math.Multiply(_D01,2,2)
Parameters
Parameter Type Description
Result Int symbol or Double symbol Symbol to receive result
Value1 Int, Double, Int symbol or Double symbol Value or symbol to use
Value2 Int, Double, Int symbol or Double symbol Value or symbol to use

Average (Avg)

Description:
It will get the average of an array of numbers.

Code example:

Math.Avg(_D01,1;2,3;5;90)
Parameters
Parameter Type Description
Result Double symbol Symbol to receive result
Number Symbols Symbol array Array of numbers to get average from

Minimum (Min)

Description:
It will return the minimum/lowest value from an array.

Code example:

Math.Min(_D01,1;2,3;5;90)
Parameters
Parameter Type Description
Result Double symbol Symbol to receive result
Number Symbols Symbol array Array of numbers to get minimum from

Maximum (Max)

Description:
It will return the maximum/highest value from an array.

Code example:

Math.Max(_D01,1;2,3;5;90)
Parameters
Parameter Type Description
Result Double symbol Symbol to receive result
Number Symbols Symbol array Array of numbers to get maximum from


Back to Programming - Commands