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)
The result will be an integer that is the absolute value of IntVal, that is the value with any negative sign removed.
More rigorously, the result will be the same as IntVal if IntVal is positive or zero, and -IntVal if it was negative.
integer AbsInt; 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 below)
The last example assumes that AbsInt was 45 due to the previous line. 45 - 50 equals -5, and llAbs(-5) equals 5.
default { state_entry() { llOwnerSay((string)llAbs(-3) + ", " + (string)llAbs(5)); // will print: 3, 5 } }