mIRC Home    About    Download    Register    News    Help

Print Thread
#55218 16/10/03 05:04 AM
Joined: Dec 2002
Posts: 62
Babel fish
OP Offline
Babel fish
Joined: Dec 2002
Posts: 62
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

#55219 16/10/03 12:00 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$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?)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard