Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »


 

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


TypeNameComment
AGGREGATE OF GENERICaggrIdcomments
GENERICinstanceId 

Return Value


 

TypeNameComment
BOOLEANinserted 

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.

 

  • No labels