Sortlist Question


Question about sortlist so I understand:

My List, (fred):

•sortlist(fred,";",16)   yields


Note that 20201119-11.csv comes before 20201119-10 and 20201119-1.csv is last

sortlist(fred,";",16+1) yields

Returns the order that I originally anticipated but the +1 option is defined as descending sort.  I looked up the definition of descending and am now confused.  Why didn't the option of 16 provide the ascending sort?




The alphanumeric sort (option = 16) sees "-11" as minus eleven., and in fact, -11 comes before -10 in numerical order. When I added the alphanumeric sort, I had two use cases in mind:

1) wave2 should sort before wave12

2) Some of us like to code information about conditions into the wave name, like maybe some input parameter, so I decided that a hyphen should be interpreted as a minus sign instead of simply a separator. You will find that 'wave1.1' sorts before 'wave10', also. Think floating-point numbers.

Igor is looking at the second numbers as negative values.

Use 16+64 for the options:

64:    Ignore + and - in the alphanumeric sort so that "Text-09" sorts before "Text-10". Set options to 80 or 81. Added in Igor Pro 7.00.