Difference between revisions of "Talk:LSL Operators"

From Second Life Wiki
Jump to navigation Jump to search
Line 15: Line 15:


:NP. It's just an almost automatted behaviour of mine when I spot unsingned comments ^_^ [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 01:32, 29 April 2009 (UTC)
:NP. It's just an almost automatted behaviour of mine when I spot unsingned comments ^_^ [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 01:32, 29 April 2009 (UTC)
The article was never finished, I had ideas but never made time to finish it. If you want to work on it, by all means do. As you can see I started making operator tables but never did more than the first one. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 06:50, 30 April 2009 (UTC)


== One/Two ==
== One/Two ==
I don't understand [https://wiki.secondlife.com/w/index.php?title=LSL_Operators&curid=3817&diff=339462&oldid=293743 this correction]. I'd even consider it beeing wrong. Can anyone explain? [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 11:31, 29 April 2009 (UTC)
I don't understand [https://wiki.secondlife.com/w/index.php?title=LSL_Operators&curid=3817&diff=339462&oldid=293743 this correction]. I'd even consider it beeing wrong. Can anyone explain? [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 11:31, 29 April 2009 (UTC)
* based on [http://en.wikipedia.org/wiki/Ones'_complement this]  ~(-1) = 0  in twos (this is what happens in LSL), ~(-1) = 1 in one's(this isn't).  however [http://en.wikipedia.org/wiki/Bitwise_operators#NOT 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. [[User:Void Singer|Void Singer]] 06:22, 30 April 2009 (UTC)
* based on [http://en.wikipedia.org/wiki/Ones'_complement this]  ~(-1) = 0  in twos (this is what happens in LSL), ~(-1) = 1 in one's(this isn't).  however [http://en.wikipedia.org/wiki/Bitwise_operators#NOT 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. [[User:Void Singer|Void Singer]] 06:22, 30 April 2009 (UTC)

Revision as of 23:50, 29 April 2009


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)

The article was never finished, I had ideas but never made time to finish it. If you want to work on it, by all means do. As you can see I started making operator tables but never did more than the first one. -- Strife (talk|contribs) 06:50, 30 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)