Talk:LSL Operators

From Second Life Wiki
Jump to navigation Jump to search


Operator Precedence

I've added a note about the precedence of || over &&, and changed their positions in the table; it would be good if someone could test the rest to see if there are any other gotchas (or if, perhaps, a knowledgeable Linden could pop in here and straighten in out). I did this one as I ran into it. Siann Beck 05:38, 6 October 2007 (PDT)

bit shifting

I've been having problems right shifting negative integers and have created a function for Right Shift to bypass the >> operator and shift the signed bit. --Dedric Mauriac 02:10, 3 February 2008 (PST)

Layout Changes?

Not fond of the groupings here. needs categorical groupings like Logical/comparison, math/assigment, bitwise, and maybe even grouping(to include lists) casts(possibly linked to the type pages) and concatenation.

Also Should we modify the layout to be more like other categories (types as an example) with separate pages for each operator (or perhaps just groups of operators)? There is a lot of information that I'd like to include on what types the operators work on, and differences between the returns when working on different types, and putting it all on one page is going to get messy. Thoughts?—The preceding unsigned comment was added on 01:16, 29 April 2009 by Void Singer

PS whoops sorry about the unsigned comment, got busy between windows.

NP. It's just an almost automatted behaviour of mine when I spot unsingned comments ^_^ Zai signature.png Lynch (talk|contribs) 01:32, 29 April 2009 (UTC)

One/Two

I don't understand this correction. I'd even consider it beeing wrong. Can anyone explain? Zai signature.png Lynch (talk|contribs) 11:31, 29 April 2009 (UTC)

  • based on this ~(-1) = 0 in twos (this is what happens in LSL), ~(-1) = 1 in one's(this isn't). however this states the operator, is ones, but links to the previous, which is contradictory (probably just a mistaken redirect, but who knows)(I've heard it called both in other references, so I'm unsure if it's a matter of habit/tradition/history or which has priority). Maybe we should just call it Bitwise NOT for clarity and have done with it? (since that describes it most acurately as flipping all the bits, regardless of result) see my other comment on regrouping (ie put bitwise operators together, etc) and adding to this page, I'd love some feedback, otherwise I'm just gonna start building it in my user page space, and move it here later. Void Singer 06:22, 30 April 2009 (UTC)