Artifact
2dee7b6b6fbe98f3c09008278a797d07fc07fdaf:
Ticket change
[2dee7b6b6f]
- New ticket
[1483802fffffffff|1483802fff] <i>lsort inconsistant behavior for negative value of -index</i>.
by
dansic on
2006-05-08 13:31:01.
D 2006-05-08T13:31:01
J assignee dkf
J cmimetype text/plain
J comment Platform:\sWindows\sXP\n\nWhen\sa\snegative\svalue\sis\sgiven\sto\sthe\s-index\soption\sof\nlsort\sinconsistant\sbehavior\sdo\soccur.\n\nThe\sman\spage\sfor\slsort\sdo\snot\sdiscuss\sbehavior\sfor\nnegative\svalue\sof\s-index.\s\sOne\swould\sexpect\seither\san\nempty\sstring\sbeing\sreturned\sor\spreferably\san\serror\sbe\nthrowned\sas\swhen\sthe\sindex\sis\sout\sof\srange.\n\nFor\ssome\snegative\svalue\sa\ssorted\slist\sis\sreturn\sbut\sit\nseems\sthat\sthe\sstable\sproperty\sof\slsort\sis\slost.\n\nFor\ssome\sother\svalue\sa\slist\sis\sreturned\sbut\swhitout\sany\ndiscernible\ssorting.\n\nFinally\sfor\ssome\sothers\svalue\san\serror\sis\sthrowned.\s\nThe\serror\sis\sthe\ssame\sas\sfor\san\sout\sof\srange\spositive\nvalue\sfor\s-index.\n\nExample:\n\n(bin)\s94\s%\sset\slist2\s{{5\s4\s6}\s{10\s12\s11}\s{2\s3\s1}\s{5\s7\s1}}\n{5\s4\s6}\s{10\s12\s11}\s{2\s3\s1}\s{5\s7\s1}\n(bin)\s95\s%\slsort\s-dictionary\s-index\s2\s$list2\n{2\s3\s1}\s{5\s7\s1}\s{5\s4\s6}\s{10\s12\s11}\n(bin)\s96\s%\slsort\s-dictionary\s-index\s-2\s$list2\n{2\s3\s1}\s{5\s7\s1}\s{5\s4\s6}\s{10\s12\s11}\n(bin)\s97\s%\slsort\s-dictionary\s-index\s-3\s$list2\n{2\s3\s1}\s{5\s4\s6}\s{5\s7\s1}\s{10\s12\s11}\n(bin)\s98\s%\slsort\s-dictionary\s-index\s3\s$list2\nelement\s3\smissing\sfrom\ssublist\s"5\s4\s6"\n(bin)\s99\s%\slsort\s-dictionary\s-index\s-4\s$list2\n{2\s3\s1}\s{5\s4\s6}\s{5\s7\s1}\s{10\s12\s11}\n(bin)\s100\s%\slsort\s-dictionary\s-index\s-5\s$list2\nelement\s-5\smissing\sfrom\ssublist\s"5\s4\s6"\n(bin)\s101\s%\slsort\s-dictionary\s-index\s-1\s$list2\n{2\s3\s1}\s{5\s4\s6}\s{5\s7\s1}\s{10\s12\s11}\n\n\n(bin)\s104\s%\sset\slist3\s{{5\s2\s3\s4\s3}\s{3\s6\s9\s2\s7}\s{5\s1\s12\n13\s15}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\s{4\s9\s3\s6\s5}}\n{5\s2\s3\s4\s3}\s{3\s6\s9\s2\s7}\s{5\s1\s12\s13\s15}\s{9\s3\s34\s12\s3}\s{1\n3\s32\s24\s5}\s{4\s9\s3\s6\s5}\n(bin)\s105\s%\slsort\s-dictionary\s-index\s0\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s2\s3\s4\s3}\s{5\s1\n12\s13\s15}\s{9\s3\s34\s12\s3}\n(bin)\s106\s%\slsort\s-dictionary\s-index\s1\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\n(bin)\s107\s%\slsort\s-dictionary\s-index\s-1\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s1\s12\s13\s15}\s{5\n2\s3\s4\s3}\s{9\s3\s34\s12\s3}\n(bin)\s108\s%\slsort\s-dictionary\s-index\s2\s$list3\n{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{3\s6\s9\s2\s7}\s{5\s1\s12\s13\s15}\s{1\s3\n32\s24\s5}\s{9\s3\s34\s12\s3}\n(bin)\s109\s%\slsort\s-dictionary\s-index\s-2\s$list3\n{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\s{4\s9\s3\s6\s5}\s{3\n6\s9\s2\s7}\s{5\s1\s12\s13\s15}\n(bin)\s110\s%\slsort\s-dictionary\s-index\s3\s$list3\n{3\s6\s9\s2\s7}\s{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{9\s3\s34\s12\s3}\s{5\s1\n12\s13\s15}\s{1\s3\s32\s24\s5}\n(bin)\s111\s%\slsort\s-dictionary\s-index\s-3\s$list3\n{3\s6\s9\s2\s7}\s{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{9\s3\s34\s12\s3}\s{5\s1\n12\s13\s15}\s{1\s3\s32\s24\s5}\n(bin)\s112\s%\slsort\s-dictionary\s-index\s4\s$list3\n{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\s{4\s9\s3\s6\s5}\s{3\n6\s9\s2\s7}\s{5\s1\s12\s13\s15}\n(bin)\s113\s%\slsort\s-dictionary\s-index\s-4\s$list3\n{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{3\s6\s9\s2\s7}\s{5\s1\s12\s13\s15}\s{1\s3\n32\s24\s5}\s{9\s3\s34\s12\s3}\n(bin)\s114\s%\slsort\s-dictionary\s-index\s5\s$list3\nelement\s5\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s115\s%\slsort\s-dictionary\s-index\s-5\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\n(bin)\s116\s%\slsort\s-dictionary\s-index\s6\s$list3\nelement\s6\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s117\s%\slsort\s-dictionary\s-index\s-6\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s2\s3\s4\s3}\s{5\s1\n12\s13\s15}\s{9\s3\s34\s12\s3}\n(bin)\s118\s%\slsort\s-dictionary\s-index\s7\s$list3\nelement\s7\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s119\s%\slsort\s-dictionary\s-index\s-7\s$list3\nelement\s-7\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n\n(bin)\s120\s%\slsort\s-index\s0\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s2\s3\s4\s3}\s{5\s1\n12\s13\s15}\s{9\s3\s34\s12\s3}\n(bin)\s121\s%\slsort\s-index\s1\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\n(bin)\s122\s%\slsort\s-index\s-1\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s1\s12\s13\s15}\s{5\n2\s3\s4\s3}\s{9\s3\s34\s12\s3}\n(bin)\s123\s%\slsort\s-index\s2\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{1\s3\s32\s24\s5}\s{9\n3\s34\s12\s3}\s{3\s6\s9\s2\s7}\n(bin)\s124\s%\slsort\s-index\s-2\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{4\s9\s3\s6\s5}\s{3\s6\s9\s2\s7}\n(bin)\s125\s%\slsort\s-index\s3\s$list3\n{9\s3\s34\s12\s3}\s{5\s1\s12\s13\s15}\s{3\s6\s9\s2\s7}\s{1\s3\s32\s24\s5}\n{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\n(bin)\s126\s%\slsort\s-index\s-3\s$list3\n{9\s3\s34\s12\s3}\s{5\s1\s12\s13\s15}\s{3\s6\s9\s2\s7}\s{1\s3\s32\s24\s5}\n{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\n(bin)\s127\s%\slsort\s-index\s4\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{4\s9\s3\s6\s5}\s{3\s6\s9\s2\s7}\n(bin)\s128\s%\slsort\s-index\s-4\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{4\s9\s3\s6\s5}\s{1\s3\s32\s24\s5}\s{9\n3\s34\s12\s3}\s{3\s6\s9\s2\s7}\n(bin)\s129\s%\slsort\s-index\s5\s$list3\nelement\s5\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s130\s%\slsort\s-index\s-5\s$list3\n{5\s1\s12\s13\s15}\s{5\s2\s3\s4\s3}\s{9\s3\s34\s12\s3}\s{1\s3\s32\s24\s5}\n{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\n(bin)\s131\s%\slsort\s-index\s6\s$list3\nelement\s6\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s132\s%\slsort\s-index\s-6\s$list3\n{1\s3\s32\s24\s5}\s{3\s6\s9\s2\s7}\s{4\s9\s3\s6\s5}\s{5\s2\s3\s4\s3}\s{5\s1\n12\s13\s15}\s{9\s3\s34\s12\s3}\n(bin)\s133\s%\slsort\s-index\s7\s$list3\nelement\s7\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"\n(bin)\s134\s%\slsort\s-index\s-7\s$list3\nelement\s-7\smissing\sfrom\ssublist\s"5\s2\s3\s4\s3"
J foundin obsolete:\s8.4.11
J priority 5\sMedium
J resolution None
J status Open
J submitter dansic
J subsystem 17.\sCommands\sI-L
J title lsort\sinconsistant\sbehavior\sfor\snegative\svalue\sof\s\s-index
J type Bug
K 1483802fffffffffffffffffffffffffffffffff
U dansic
Z 9792f589becf15c669ee86f532e8bc50