Skip to main content

descending

Short summary

This method sorts the data structure in a descending order, so from great to low. The sorting will be finished within method call. Uses the passed comparator or compareTo of the contained objects if no comparator is passed.

Return: ABORTED: While descending sort was pending,execute had a falling edge, ERROR: descending sort was not able to finish (p.e. List changed) call descending(false) to reset SUCCESS: descending sort was finished

Parameters

NameTypeCommentKind
comparatorCNM_AbstractObject.IComparatorthe comparator that should be used for the sort. Must not be changed while sort is in processinput

Code

Declaration

METHOD descending :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*the comparator that should be used for the sort. Must not be changed while sort is in process*)
comparator :CNM_AbstractObject.IComparator := 0;
END_VAR