PropertyHandle :: Sum - Calculate sum for an attribute in a collection
The function returns the sum calculated. In case of an error, the function returns an invalid property handle.
Implementation details
The aggregation function calculates the sum for an attribute for all instances in a collection. When a filter condition has been set, only instanced fulfilling the filter condition are considered.
The value returned has the same type as the operand value.
- expression
- Inline expression
An ad hoc expression can be passed as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon should be appended. Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.
In contrast to class expressions, ad hoc expressions are not defined explicitly as class expressions but passed as strings to the application at run time.
operand: a + funct(b)
complete expression :
bool expr(int a)
{
return(a*a);
}