Artifact
a6b65768b13daead5b6796a48a2d93c42cc219e7:
Ticket change
[a6b65768b1]
- New ticket
[474335ffffffffff|474335ffff] <i>logic of matherr is backwards</i>.
by
dgp on
2001-10-24 03:45:18.
D 2001-10-24T03:45:18
J assignee mdejong
J cmimetype text/plain
J comment \nA\ssimple\slook\sat\sthe\scvs\shistory\sof\s\nunix/tclMtherr.c\sshows\sthe\sintroduction\sof\na\sbug:\n\ncvs\sdiff\s-r\score-8-0-5\s-r\score-8-1-0\stclMtherr.c\n...\nmatherr(xPtr)\n\s\s\s\s\sstruct\sexception\s*xPtr;\s\s\s\s/*\sDescribes\serror\sthat\noccurred.\s*/\n\s{\n-\s\s\s\sif\s(!tcl_MathInProgress)\s{\n+\s\s\s\sif\s(TclMathInProgress())\s{\n\s\s\s\s\s\s\s\sreturn\s0;\n...\n\nThe\s"!"\sdid\snot\ssurvive\sthe\stransition\sfrom\naccess\sof\sa\sglobal\svariable\sto\scall\sof\san\sinternal\nfunction.\s\sThe\slogic\sof\smatherr()\sbecame\sreversed.\nThe\sobvious\sfix\sis\sto\srestore\sthe\sproper\slogic.\n\nIt's\sworth\spausing\sthough\sand\sasking\swhy\sthis\nbug\shasn't\sbeen\snoticed\sin\sthe\s3\syears\ssince\sit\nwas\sintroduced.\s\sI\sam\sunable\sto\scome\sup\swith\nany\sscript\son\sany\splatform\sthat\sexposes\sthis\serror.\n\nIt\sseems\sthat\sTcl\sbehaves\sthe\ssame\swhether\sthe\nlogic\sis\sforwards\sor\sbackwards.\nIt\swould\sseem\sthen\sthat\sTcl\swould\salso\sbehave\sthe\nsame\sif\sthe\slogic\swere\scompletely\sremoved.\s\sI\swelcome\nsecond\sopinions\son\sthis,\sbut\smy\sinclination\swould\nbe\sto\sremove\sthe\smatherr()\sroutine\saltogether\nunless\ssomeone\scan\sdemonstrate\sit's\sserving\sa\nuseful\spurpose\ssomewhere.\s\s(And\show\suseful\scan\nit\sbe\sif\sit's\sbeen\swrong\ssince\sTcl\s8.1.0\s?)\n
J foundin obsolete:\s8.4a4
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 52.\sPortability\sSupport
J title logic\sof\smatherr\sis\sbackwards
J type Bug
K 474335ffffffffffffffffffffffffffffffffff
U dgp
Z 2ffedf6edfc42f15558779aabf49f894