Operators"

From Documentation
m
Line 1: Line 1:
 
{{ZUMLReferencePageHeader}}
 
{{ZUMLReferencePageHeader}}
  
In addition to the . and [] operators discussed in Variables, EL expressions provide the following operators:
+
EL expressions provide the following operators:
  
* Arithmetic: +, - (binary), *, / and div, % and mod, - (unary)
+
{| border='1px'
* Logical: and, &&, or, ||, not, !
+
! Type !! Description
* Relational: ==, eq, !=, ne, <, lt, >, gt, <=, ge, >=, le. Comparisons can be made against other values, or against boolean, string, integer, or floating point literals.
+
|-
* Empty: The empty operator is a prefix operation that can be used to determine whether a value is null or empty.
+
| Arithmetic
* Conditional: A ? B : C. Evaluate B or C, depending on the result of the evaluation of A.
+
| +, -<ref>binary</ref>, *, /, div, %, mod, -<ref>unary</ref>
 +
|-
 +
| Logical
 +
| and, <nowiki>&&</nowiki>, or, <nowiki>||</nowiki>, not, !, empty<ref>The empty operator is a prefix operation that can be used to determine whether a value is null or empty.</ref>
 +
|-
 +
| Relational<ref>Comparisons can be made against other values, or against boolean, string, integer, or floating point literals.</ref>
 +
==, eq, !=, ne, <, lt, >, gt, <=, ge, >=, le
 +
|-
 +
| Conditional
 +
| A ? B : C<ref>Evaluate B or C, depending on the result of the evaluation of A.</ref>
 +
|}
 +
<blockquote>
 +
----
 +
<references/>
 +
</blockquote>
  
 
The precedence of operators highest to lowest, left to right is as follows:
 
The precedence of operators highest to lowest, left to right is as follows:

Revision as of 02:34, 25 November 2010

EL expressions provide the following operators:

Type Description
Arithmetic +, -[1], *, /, div, %, mod, -[2]
Logical and, &&, or, ||, not, !, empty[3]
Relational[4] ==, eq, !=, ne, <, lt, >, gt, <=, ge, >=, le
Conditional A ? B : C[5]

  1. binary
  2. unary
  3. The empty operator is a prefix operation that can be used to determine whether a value is null or empty.
  4. Comparisons can be made against other values, or against boolean, string, integer, or floating point literals.
  5. Evaluate B or C, depending on the result of the evaluation of A.

The precedence of operators highest to lowest, left to right is as follows:

  • [] .
  • () - Used to change the precedence of operators.
  • - (unary) not ! empty
  • * / div % mod
  • + - (binary)
  • < > <= >= lt gt le ge
  • == != eq ne
  • && and
  • || or
  • ? :

Version History

Last Update : 2010/11/25


Version Date Content
     



Last Update : 2010/11/25

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.