Difference between revisions of "Talk:LSL Operators"
Void Singer (talk | contribs) m (→One/Two) |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
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. [[User:Siann Beck|Siann Beck]] 05:38, 6 October 2007 (PDT) | 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. [[User:Siann Beck|Siann Beck]] 05:38, 6 October 2007 (PDT) | ||
SVC-779 seems to have decided that this they have equal precedence, as that would explain the cases here,[[User:Reddot99 Republic|Reddot99 Republic]] 17:11, 23 May 2010 (UTC) | |||
== bit shifting == | == bit shifting == | ||
Line 15: | Line 17: | ||
: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) | |||
::I changed the operator names to Bitwise-NOT and Binary-NOT since those are similar to the names used for CIL opcodes. Logical-NOT could be used instead of Binary-NOT and might make more sense. The link in the article as you point out is wrong, I have removed it. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 06:58, 30 April 2009 (UTC) | |||
:::The second wiki article? or the first? I guess it all depends on if you're referring to the action or the system... where the action may be tecnically correct in the context of subtraction, the system is also technically correct in the context of the result (and less confusing IMO) [http://en.wikipedia.org/wiki/Method_of_complements ref.] (I'm preferential to Logical over Binary, since it's a more common usage, and allows better grouping) | |||
:::PS is there a template for the extended user info you two are using for signatures? or does it just not show for my own when I'm logged in? [[User:Void Singer|Void Singer]] 18:19, 30 April 2009 (UTC) | |||
::::In the prefrences there is a "Signiture" field that allows you to configure it. The field in preview MW versions was labeled "Nickname". -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 11:33, 1 May 2009 (UTC) | |||
== NOT assignment == | |||
I had trouble looking for 'NOT assignment', where some 'bootest' value would be toggled by assignment. "bootest =! bootest" correctly toggles the boolean test variable switch, but =! is not shown on this page. Was I looking on the wrong page to begin with? [[User:Romaq Rosher|Romaq Rosher]] 16:24, 7 September 2009 (UTC) | |||
: "=!" is not an operator, it's two operators. It's Assignment and Boolean-NOT. The Boolean-NOT gets executed first. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 17:24, 7 September 2009 (UTC) |
Latest revision as of 10:11, 23 May 2010
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)
SVC-779 seems to have decided that this they have equal precedence, as that would explain the cases here,Reddot99 Republic 17:11, 23 May 2010 (UTC)
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 ^_^
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? 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)
- I changed the operator names to Bitwise-NOT and Binary-NOT since those are similar to the names used for CIL opcodes. Logical-NOT could be used instead of Binary-NOT and might make more sense. The link in the article as you point out is wrong, I have removed it. -- Strife (talk|contribs) 06:58, 30 April 2009 (UTC)
- The second wiki article? or the first? I guess it all depends on if you're referring to the action or the system... where the action may be tecnically correct in the context of subtraction, the system is also technically correct in the context of the result (and less confusing IMO) ref. (I'm preferential to Logical over Binary, since it's a more common usage, and allows better grouping)
- PS is there a template for the extended user info you two are using for signatures? or does it just not show for my own when I'm logged in? Void Singer 18:19, 30 April 2009 (UTC)
NOT assignment
I had trouble looking for 'NOT assignment', where some 'bootest' value would be toggled by assignment. "bootest =! bootest" correctly toggles the boolean test variable switch, but =! is not shown on this page. Was I looking on the wrong page to begin with? Romaq Rosher 16:24, 7 September 2009 (UTC)