Abs function

The Abs function returns the absolute value of the expression. The absolute value of a real number is its distance from 0 (zero) without regard to direction from zero. Use the Abs function to convert a negative number to a positive number.

value = Abs(expression)

/* Assigns the value 100 to absolute_value. */
absolute_value = Abs(-100)

/* Assigns the value 300 to the variable B.  */
A = 500
B = Abs(A - 800)

/* Assigns the value 0 to the variable C.  */
C = Abs(0)
  • guides/programming/programmers_reference_manual/abs.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1