Abs (number)

Parameters

number = any valid number or numeric variable

Description

Use this command to return the absolute value of a number; meaning its positive value. A negative 3 would become a positive 3. If what you want is a number without a fraction (say, convert 3.1415 into 3) use the Int() command.

Example

number=-3

Print "The absolute value of " + number + " is: " + Abs(number)

WaitKey()

Index

Click here to view the latest version of this page online