.
D 2003-06-23T23:38:24
J assignee dkf
J cmimetype text/plain
J comment Either\sthe\sdocumentation\sfor\sthe\slsearch\s-dictionary\s\noption\sis\smisleading,\sor\sthe\soption\sisn't\simplemented\s\nproperly.\n\nThe\sdocumentation\sstates:\n\n"-dictionary:\sThe\slist\selements\sare\sto\sbe\scompared\susing\s\ndictionary-style\scomparisons.\sThis\soption\sis\sonly\s\nmeaningful\swhen\sused\swith\s-exact\sor\s-sorted."\n\nDrawing\sfrom\sthe\sbehavior\sof\slsort\s-dictionary,\sone\swould\s\nassume\sthat\sthe\slsearch\s-dictionary\swould\sbe\scase-\ninsensitive\sand\shandle\sembedded\snumbers\sappropriately.\s\nIn\sother\swords,\sone\smight\sreasonably\sassume\sthat\sboth\s\nof\sthe\sfollowing\slsearch\scommands\swould\sreturn\s1:\n\n%\sset\svals\s[lsort\s-dictionary\s{B4.GIF\sb13.gif\sb2.Gif\sB7.gif\s\nb8.gif}]\nb2.Gif\sB4.GIF\sB7.gif\sb8.gif\sb13.gif\n%\slsearch\s-sorted\s-dictionary\s$vals\sb4.gif\n-1\n%\slsearch\s-exact\s-dictionary\s$vals\sb4.gif\n-1\n\nIn\sfact,\sthey\sreturn\s-1.\sThus,\sin\sreality\sthe\sonly\suse\s\ncurrently\sfor\slsearch\s-dictionary\sis\sto\ssignal\sthe\sthe\slist\sis\s\nsorted\sequivalently\sto\sthe\sreturn\svalue\sof\slsort\s-\ndictionary.\sIn\sfact,\sgiven\ssuch\sa\slist,\sa\sprogrammer\s\n*must*\suse\slsearch\s-dictionary;\somitting\sit\scan\sfail\sto\s\nmatch\ssuccessfully.\sFor\sexample:\n\n%\slsearch\s-sorted\s-dictionary\s$vals\sB4.GIF\n1\n%\slsearch\s-sorted\s$vals\sB4.GIF\n-1\n\nReading\sthe\scode\sfor\slsearch\sin\stclCmdIL.c,\sI'm\snot\ssure\s\nwhat\sis\sthe\sintended\soperation\sof\slsearch\s-dictionary\sin\s\ncases\slike\sthis.\sEven\sin\sthe\scase\sof\sa\slinear\ssearch\s(for\s\nexample,\sif\sthe\suser\sexecutes\slsearch\s-exact\s-\ndictionary),\sthe\sDictionaryCompare()\sfunction\sis\sused.\s\nBut\sthis\sis\spointless,\sas\sthe\s"secondary\scomparison"\s\nfeature\sof\sDictionaryCompare()\sstill\sreports\s"B4.GIF"\sas\s\nless\sthan\s"b4.gif"\s(not\sequal),\sthe\ssame\sas\sa\ssimple\s\nstring\scomparison.\n\nSo,\sI\sdon't\sknow\swhat\sthe\sproper\sresolution\sis.\sI\ssee\s2\s\noptions:\n\n1)\sChange\sthe\sdocumentation\sto\sindicate\sthat\sthe\sonly\s\npurpose\sof\slsearch\s-dictionary\sis\sto\ssignal\sa\s"dictionary-\nsorted"\slist\sin\sconjunction\swith\s-sorted;\sor\n\n2)\sChange\sthe\simplementation\sof\slsearch\s-dictionary\sto\s\nproduce\sthe\sfollowing\sresults\sfrom\sthe\sabove\sexamples:\n\n%\slsearch\s-sorted\s-dictionary\s$vals\sb4.gif\n1\n%\slsearch\s-exact\s-dictionary\s$vals\sb4.gif\n1
J foundin obsolete:\s8.4.2
J priority 5\sMedium
J resolution None
J status Open
J submitter kenj
J subsystem 17.\sCommands\sI-L
J title lsearch\s-dictionary\sdocumentation\smisleading
J type Bug
K 759545ffffffffffffffffffffffffffffffffff
U kenj
Z 1cc16e3735a41ab66a7f28d24f3dea5d