[Implemented] New constants for Sort... command Options

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

[Implemented] New constants for Sort... command Options

Post by USCode »

The commands SortArray, SortList, SortStructuredArray, SortStructuredList all have the following 4 'Options' that can be passed:

0: Sort the array in ascending order (low values first)
1: Sort the array in descending order (high values first)
2: Sort a string array without case sensitive (a=A, b=B etc..) in ascending order
3: Sort a string array without case sensitive (a=A, b=B etc..) in descending order

Instead of passing one of those values, it would improve code readability and clarity to have them predefined as #PB... constants instead, e.g.:

0: #PB_Sort_Ascending
1: #PB_Sort_Descending
2: #PB_Sort_Nocase_Ascending
3: #PB_Sort_Nocase_Descending
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Post by USCode »

Maybe instead for PB4B6 (final?) ... :wink:
Post Reply