mIRC Homepage
Posted By: lonesome $sorttok still buggy? - 16/10/03 05:04 AM
It seems that $sorttok hasn't been totally fixed..

//echo -a $sorttok(23 -4 -7 54 -47 0 -1,32)
returns
-1 -4 -47 -7 0 23 54

which is still wrong.
however, when the 'n' parameter is included, it returns the correct results.

//echo -a $sorttok(23 -4 -7 54 -47 0 -1,32,n)
returns
-47 -7 -4 -1 0 23 54

is this a bug? since in the first case, it shld have already recognised it as numbers. Or correct me if it was made to work this way, as without the 'n' parameter, '-' was simply regarded as another character infront of the numbers.. confused
Posted By: qwerty Re: $sorttok still buggy? - 16/10/03 12:00 PM
$sorttok(<text>,32) doesn't do a numeric sort, it sorts alphabetically. Otherwise the "n" switch would be pointless, wouldn't it? And no, it shouldn't recognize that the input is only numbers and do a numeric sort without n. It's your job to tell mirc to do a numeric sort, by specifying "n" (what if I wanted an alphabetical sort on numbers?)
© mIRC Discussion Forums