<i>compiled lindex botches index artihmetic</i> status still Open with 4 other changes
by
.
D 2018-03-01T19:10:37.076
J comment %\slindex\s{a\sb\sc}\s-1-1\r\nc\r\n\r\nCorrect\sanswer\sshould\sbe\sthe\sempty\sstring.\r\n\r\nThe\sbytecode\scompiler\sfor\s[lindex]\stries\sto\r\nencode\sthe\sindices\s"end",\s"end-1",\s....\setc.\r\nas\sthe\simmediate\sbytecode\sarguments\s-2,\s-3,\s....\r\n\r\nIt\signores\sthe\spossibility\sthat\sTclGetIntForIndex()\r\ncan\sreturn\sthose\svalues\sas\slegit\sindex\svalues\r\nresulting\sfrom\sindex\sarithmetic.\s\sIn\sthis\sexample\r\nthe\sindex\s"-2"\sis\sgetting\sinterpreted\sas\sif\sit\swere\s"end".
J icomment \r\n%\slrange\s{a\sb\sc}\s0-3\s0-2\r\nb\sc\r\n\r\nSame\sfundamental\scause.\r\n\r\ntraces\sback\sto:\r\n\r\nhttps://core.tcl.tk/tcl/info/533a2ba7b7d13364
J login dgp
J mimetype text/plain
K db36fa5122259be74d0ccadd102e076094703052
U dgp
Z 2fe0fadd342840d08a6a87e402b446cc