You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This is an old revision of the document!
Any integer value (can be negative)
It returns an integer that is the absolute value of ival
, that is, the value with any negative sign removed.
More rigorously, the result will be the same as ival
if ival
is positive or zero, and -ival
if it is negative.
integer AbsInt; AbsInt = llAbs(-3); // sets AbsInt to 3 AbsInt = llAbs(-45); // sets AbsInt to 45 AbsInt = llAbs(0); // sets AbsInt to 0 AbsInt = llAbs(45); // sets AbsInt to 45 Absint = llAbs(AbsInt - 50); // sets AbsInt to 5 (see explanation below)
The last example assumes that AbsInt
was 45 due to the previous line. 45 - 50 equals -5, and llAbs(-5)
equals 5.