[MQL5] What is the utility of the mode parameter if a list is always sorted in ascending mode?

To add comments, please log in or register
Pierre Rougier
725
Pierre Rougier  

Hi,

What is the utility of the mode parameter if a list is always sorted in ascending mode?

https://www.mql5.com/en/docs/standardlibrary/datastructures/clist/clistsort


Sort
Sorts a list.

void  Sort( 
   int  mode      // sorting mode 
   )

Parameters

mode

[in] Sorting mode.

Return Value

No.

Note

The list is always sorted in ascending order.
Documentation on MQL5: Standard Library / Data Collections / CList / Sort
Documentation on MQL5: Standard Library / Data Collections / CList / Sort
  • www.mql5.com
Standard Library / Data Collections / CList / Sort - Reference on algorithmic/automated trading language for MetaTrader 5
whroeder1
17928
whroeder1  
Pierre Rougier: What is the utility of the mode parameter if a list is always sorted in ascending mode?
The mode is passed to each object which determines what is being sorted. Example would be list of orders, do you want it ordered by ticket, or by open time, or by price etc.
Pierre Rougier
725
Pierre Rougier  
whroeder1:
The mode is passed to each object which determines what is being sorted. Example would be list of orders, do you want it ordered by ticket, or by open time, or by price etc.

OK, it is up to the developer to choose the use of this parameter.

Thanks whroeder1

To add comments, please log in or register