FUNCTION xpfAddToAggrIfNotInAggr (aggr : AGGREGATE OF GENERIC; element : GENERIC) inserted : BOOLEAN;
Use this function to add an element to aggregate if the aggregate does not have an element with the same value.
xpfAddToAggrIfNotInAggr(aggr, element) performs the same as the following statements:
IF NOT (element IN aggr) THEN aggr ++ element; END_IF;
Arguments
Type | Name | Comment |
AGGREGATE OF GENERIC | aggrId | comments |
GENERIC | instanceId |
Return Value
Type | Name | Comment |
BOOLEAN | inserted |
Options
Example
LOCAL OK : BOOLEAN; str : STRING; aggr: LIST OF STRING; END_LOCAL; ... str := 'QWERTY'; OK := xpfAddToAggrIfNotInAggr(aggr, str); IF OK THEN xpxPrintf('\n%s inserted', str); END_IF; ...
See also
Filter by label
There are no items with the selected labels at this time.