Don't click here unless you want to be banned.
LSL Wiki :
Equality
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawling021.us.archive.org
=====Equality===== //Equality// [[operators]] in LSL test a condition on two inputs and return a value of TRUE or FALSE. ===Equality Operators=== |||c **Operator** || **Name** || **Syntax** || **Description** || || **>** || Greater then || ##**var1 > var2**## ""<br>""|| Returns ##TRUE## if ##var1## is greater then ##var2##, ##FALSE## otherwise. ""<br>""##var1## and ##var2## must be either an integer or a [[float]].|| || **<** || Less then || ##**var1 < var2**## || Returns ##TRUE## if ##var1## is less then ##var2##, ##FALSE## otherwise. ""<br>""##var1## and ##var2## must be either an integer or a float.|| || **>=** || Greater then or equal to || ##**var1 >= var2**## ""<br>""|| Returns ##TRUE## if ##var1## is greater then or equal to ##var2##, ##FALSE## otherwise. ""<br>""##var1## and ##var2## must be an integer or a float.|| || **<=** || Less then or equal to || ##**var1 <= var2**## ""<br>""|| Returns ##TRUE## if ##var1## is less then or equal to ##var2##, ##FALSE## otherwise. ""<br>""##var1## and ##var2## must be an integer or a float.|| || **!=** || Not equal to || ##**var1 != var2**## ""<br>""|| Returns ##TRUE## if ##var1## is not equal to ##var2##, ##FALSE## otherwise. ""<br>""##var1## and ##var2## can be any [[type]].|| || **""==""** || Equal to || ##**var1 ""=="" var2**## ""<br>""|| Returns TRUE if ##var1## is equal to ##var2##, FALSE otherwise. ""<br>""##var1## and ##var2## can be any type.||| **Note:** -When using **##""==""##** or **##!=##** on [[list lists]], it's important to remember that only the list lengths are compared. So "##["a"] ""=="" ["b"]##" would return ##TRUE##, the same as "##[[llGetListLength]](["a"]) ""=="" [[llGetListLength]](["b"])##". - "##["a"] ""!="" ["b"]##" is the same as "##[[llGetListLength]](["a"]) - [[llGetListLength]](["b"])##" -Do not confuse the [[assignment]] operator "=" with the equality operator """=="""! When comparing two values, use """==""". When //assigning// a value, use "=". The compiler will not catch your error, as it's possible to assign values within an IF statement delibeartely. Compiling a script with "=" rather than """==""" will probably cause the statement to evaluate to ##TRUE## and the conditional variable to become corrupted. These operators are often used in [[ifelse conditional statements]]. ---- [[Operators]] | [[Unary]] | [[Binary]] | [[Bitwise]] | [[Boolean]] | [[Equality]] | [[Assignment]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2