LlAbs

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 14: Line 14:
 
|caveats=*The llAbs of -2147483648 is -2147483648. This is because the positive integer 2147483648 is outside the range of allowed LSL {{LSLGC|Integer|integer values}}.
 
|caveats=*The llAbs of -2147483648 is -2147483648. This is because the positive integer 2147483648 is outside the range of allowed LSL {{LSLGC|Integer|integer values}}.
 
|examples=
 
|examples=
<lsl>
+
<source>
 
default
 
default
 
{
 
{
Line 24: Line 24:
 
     }
 
     }
 
}
 
}
</lsl>
+
</source>
<lsl>
+
<source>
 
// Here's a more elaborate example.
 
// Here's a more elaborate example.
  
Line 52: Line 52:
 
//  Test Object:    llAbs(-20) --> 20
 
//  Test Object:    llAbs(-20) --> 20
 
//  Test Object:    llAbs(0) --> 0
 
//  Test Object:    llAbs(0) --> 0
</lsl>
+
</source>
 
|helpers
 
|helpers
 
|also_header
 
|also_header

Revision as of 11:31, 28 January 2019

Summary

Function: integer llAbs( integer val );

Returns Template:Integer that is the positive version of val.

• integer val Any integer value
Template:LSL Other Languages

Caveats

  • The llAbs of -2147483648 is -2147483648. This is because the positive integer 2147483648 is outside the range of allowed LSL Template:LSLGC.

Examples

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lsl, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lsl, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

See Also

Functions

•  llFabs float version of llAbs

Articles

•  Template:Wikipedia
Personal tools
General
About This Wiki