ascending
Short summary
This method sorts the data structure immediately in an ascending order. 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 sort was pending,execute had a falling edge,
ERROR: Sort was not able to finish (p.e. List changed) call sort(false) to reset
SUCCESS: Sorting was finished
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| comparator | CNM_AbstractObject.IComparator | Optional: the comparator that should be used for the sort. Must not be changed while sort is in process | input |
Code
Declaration
METHOD ascending :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*Optional: 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