Operators"

From Documentation
(Created page with '{{ZUMLReferencePageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- |   |   |   |} {{ZUMLReferencePageFo…')
 
Line 1: Line 1:
 
{{ZUMLReferencePageHeader}}
 
{{ZUMLReferencePageHeader}}
 +
 +
In addition to the . and [] operators discussed in Variables, EL expressions provide the following operators:
 +
 +
* Arithmetic: +, - (binary), *, / and div, % and mod, - (unary)
 +
* Logical: and, &&, or, ||, not, !
 +
* 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.
 +
* Conditional: A ? B : C. 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=
 
=Version History=

Revision as of 11:49, 24 November 2010

In addition to the . and [] operators discussed in Variables, EL expressions provide the following operators:

  • Arithmetic: +, - (binary), *, / and div, % and mod, - (unary)
  • Logical: and, &&, or, ||, not, !
  • 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.
  • Conditional: A ? B : C. 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/24


Version Date Content
     



Last Update : 2010/11/24

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