Skip to content
Tcl Source Code Artifact [2d4d004879]
Login

Artifact [2d4d004879]

Artifact 2d4d0048794be00f3b9ac7e0866541ed63db80c8:

Ticket change [2d4d004879] - Ticket [1667660fffffffff|1667660fff] <i>[lsort -integer] not updated for bignums</i> status still Open with 4 other changes by afredd on 2007-02-26 19:12:48.
D 2007-02-26T19:12:48
J icomment Logged\sIn:\sYES\s\nuser_id=1386588\nOriginator:\sNO\n\n\nI\sdon't\ssee\sthis\sas\sa\sbug,\sas\sthe\sgiven\sstring\nis\snot\sa\sTcl\sinteger:\n\n%\sinfo\spat\n8.5a4\n%\sstring\sis\sinteger\s1000000000000000000000000\n0\n\n...and\sthe\sdocs\sfor\slsort\ssay:\n\n#\s-integer\s\n#\s\sConvert\slist\selements\sto\sintegers\n#\s\sand\suse\sinteger\scomparison.\n\nAnother\sargument\sfor\snot\schanging\s-integer\sto\nsupport\sbigint's\s(and\swides\s>\s2**32!),\sis\sthat\nthis\swould\sslow\sit\sdown\sconsiderably\sfor\sall\susers,\nmost\sof\swhom\snever\sgo\snear\sbigints.\n\nHowever,\si\sdo\sthink\sthe\sexample\sshould\sbe\spossible,\nbut\swith\sa\snew\soption\sthat\sdoes\sperform\snumeric\ncomparison\son\s*any*\sof\sTcl's\snumber\stypes\neg.\s[lsort\s-numeric\s...]\n\nAlso\sworth\sconsidering\sis\sthe\sintroduction\sof\sa\n<=>\s*operator*\sthat\sdoes\sa\snumeric\scomparison\slike:\n\nproc\s::tcl::mathop::<=>\s{a\sb}\s{\n\sif\s{$a\s>\s$b}\s{\n\s\sreturn\s1\n\s}\selseif\s{$a\s<\s$b}\s{\n\s\sreturn\s-1\n\s}\selse\s{\n\s\sreturn\s0\n\s}\n}\n\nThis\swould\sbe\sespecially\suseful\sin\swriting\slsort\ncomparison\sroutines.\n\nJust\smy\s$0.02.\n\n\n
J login afredd
J mimetype text/plain
J username afredd
K 1667660fffffffffffffffffffffffffffffffff
U afredd
Z dcc305b68da1e64cb4c210fccd484e06