Menu

ABS comparison between two values

2014-02-04
2014-02-04
  • alejandro1957

    alejandro1957 - 2014-02-04

    there is a function or library between two values ​​and ABS as if it implements?

     
  • Anobium

    Anobium - 2014-02-04

    Hi. I am sorry. The question is not clear.

    Do you mean? Is there a method the determines the Absolute value of an Integer? Yes. there.

    ABS

    Syntax:
    integer_variable = ABS( integer_variable )

    Command Availability:

    Available on all microcontrollers

    Explanation:

    The ABS function will computes the absolute value of a integer number therefore in the range of -32678 to 32768.

    Example:

    absolute_value = Abs( -127 ): ' Will return 127

    absolute_value = Abs( 127 ): ' Will return 127 also. :-)

     
  • alejandro1957

    alejandro1957 - 2014-02-04

    right, just that I was looking for.

    sorry for my english....:-P

     

Log in to post a comment.