Difference between revisions of "Operators"

From SDU
Jump to: navigation, search
m (Reverted edits by Agegeleruvy (Talk); changed back to last version by Michal.kopl)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Spel Reference Guide|<< back]]
+
__NOTOC__
 +
[[Category:Customizations]]
 +
{{Global Header}}
 +
{{Global Announcement}}
  
 
== Arithmetic Operators ==
 
== Arithmetic Operators ==
 
 
<source lang="javascript">
 
<source lang="javascript">
+
+
+ Addition
-
+
-   Subtraction
*
+
* Multiplication
/
+
/   Division
 +
% Modulo, for example a % b will result in the remainder of a divided by b
 
</source>
 
</source>
  
== Comparison Operators ==
+
== Comparison (Relational) Operators ==
 
+
 
<source lang="javascript">
 
<source lang="javascript">
==
+
== Equal to
!=
+
!= Not Equal to
 +
<= Less than or equal to
 +
<  Less than
 +
>= Greater than or equal to
 +
>  Greater than
 
</source>
 
</source>
  
 
== Concatenation Operators ==
 
== Concatenation Operators ==
 
 
<source lang="javascript">
 
<source lang="javascript">
 
+
 
+
Line 24: Line 29:
  
 
== Logical Operators ==
 
== Logical Operators ==
 
 
<source lang="javascript">
 
<source lang="javascript">
 
||
 
||
 
&&
 
&&
 
!
 
!
 +
</source>
 +
 +
== Assignment Operators ==
 +
<source lang="javascript">
 +
=  simple assignment
 +
+= Compound addition, like in C
 +
-=  Compound subtraction
 +
*= Compound multiplication
 +
/= Compound division
 +
%= Compound modulo
 
</source>
 
</source>

Latest revision as of 05:22, 30 November 2010

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Arithmetic Operators

<source lang="javascript"> + Addition - Subtraction

  • Multiplication

/ Division % Modulo, for example a % b will result in the remainder of a divided by b </source>

Comparison (Relational) Operators

<source lang="javascript"> == Equal to != Not Equal to <= Less than or equal to < Less than >= Greater than or equal to > Greater than </source>

Concatenation Operators

<source lang="javascript"> + </source>

Logical Operators

<source lang="javascript"> || && ! </source>

Assignment Operators

<source lang="javascript"> = simple assignment += Compound addition, like in C -= Compound subtraction

  • = Compound multiplication

/= Compound division %= Compound modulo </source>