LSL Addition: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Void Singer (talk | contribs)
m for new categorized operator page, needs work
 
Strife Onizuka (talk | contribs)
Because the category include syntax trumps link syntax. You have to use explicit link syntax to bypass the collision. Don't you just love wiki markup? Makes things so much simpler. 9_9
Line 4: Line 4:


{{void-box
{{void-box
|title=[[Category:LSL Operators|Operator]]<nowiki>:</nowiki> ''+'' <!-- YTH does specifying a category page with link text wipe out the link? -->
|title=[[:Category:LSL Operators|Operator]]<nowiki>:</nowiki> ''+''
|content=
|content=
=== This operator affects the following types ===
=== This operator affects the following types ===
Line 30: Line 30:
** "a" + "a"
** "a" + "a"
*** Result = "aa"
*** Result = "aa"
* [[Key]]
** Example:
** "a" + "a"
*** Result = "aa"
*** *see [[LSL_Addition#Notes|Notes]] for more details
* [[List]]
* [[List]]
** Example:
** Example:

Revision as of 16:49, 11 January 2010

this page needs to be templatized for abstraction to other operators after layout is finalized this is only a sample layout, feel free to suggest other layouts.

Operator: +

This operator affects the following types

  • Integer
    • Example:
    • 1 + 1
      • Result = 2
  • Float
    • Example:
    • 1.0 + 1.0
    • 1.0 + 1
    • 1 + 1.0
      • Result = 2.0
  • Vector
    • Example:
    • <1.0, 1.0, 1.0> + <1.0, 0.0, -1.0>
      • Result = <2.0, 1.0, 0.0>
  • Rotation
    • Example:
    • <0.0, 0.0, 0.0, 1.0> + <1.0, 0.0, 0.0, 1.0>
      • Result = <1.0, 0.0, 0.0, 2.0>
      • *see Notes for more details
  • String
    • Example:
    • "a" + "a"
      • Result = "aa"
  • List
    • Example:
    • [1] + [2]
      • Result = [1, 2]

Notes

  • Addition is also called Concatenation when used with strings, keys, or lists.
  • rotation addition notes
    • blah blah blah
  • Key concatenation notes
    • blah blah blah
  • link article about min/max integer/float values
  • link article about max string, key, and list lengths