Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-07-15
22:45 • Ticket [771539ffff] lsort: misleading error message status still Closed with... artifact: 3ba7435ea6 user: dkf
22:45 • Closed ticket [771539ffff]. artifact: d54996d5fa user: dkf
22:37 • Ticket [771539ffff]: 4 changes artifact: 85c5b2b675 user: dgp
11:49 • New ticket [771539ffff]. artifact: 88d15d6311 user: nobody

lsort: misleading error message

Closed / Fixed771539ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2003-07-15 11:49:46
Run, for example:

proc compare {arg1 arg2} { return 0.0 }

lsort -command compare { 17 42 }

You get:

   "-compare command returned non-numeric result"

This is rather confusing. It should better say something
like:

   "-compare command returned non-integer result"

Well, a little bit nitpicking, but a remarkable amount
of confusion happend in real life...


See File generic/tclCmdIL.c (line 3702) in snapshot of
today.
dgpplain2003-07-15 22:37:12
Logged In: YES 
user_id=80530


perhaps "non-int result" might be even better,
since values outside the 32-bit range are
also rejected.
dkfplain2003-07-15 22:45:35
Logged In: YES 
user_id=79902

I'm sticking with non-integer.  I hate putting type names in 
documentation or error messages...
dkf Ticket [771539ffff]: 2 changes [History diff]2003-07-15 22:45:36
Log in (anonymous is fine) to add a comment.