: <i>Object type info can be lost after comparison (e.g. INST_EQ)</i> plus 6 other changes
by
.
D 2008-02-14T23:13:56
J closedate 2008-02-14T16:13:56
J closer dgp
J icomment Logged\sIn:\sYES\s\nuser_id=80530\nOriginator:\sNO\n\n\nYour\serror\sis\sin\sthinking\sabout\nthis\sas\s"type\sinformation".\s\sThat's\nnot\swhat\sit\sis.\s\sTcl\svalues\sare\suntyped,\nor\sstring\styped\sif\syou\sprefer.\s\sThe\ninternal\srep\sis\sonly\sa\scache\sof\sthe\nmost\srecent\sconversion\sdone\sso\sthat\nif\sthat\ssame\sconversion\sis\sneeded\sagain\n(frequently\sthe\scase)\sit\sneed\snot\sbe\nrepeated.\s\sThe\sobjPtr->typePtr\sindicates\nwhich\skind\sof\sconversion\shas\sbeen\scached;\nnothing\smore.\n\nFrom\sthis\sperspective,\syour\sclaim\s"there\nis\sno\sguarantee\sthat\sthe\stype\sconversion\sis\nreversible"\sis\ssimply\sfalse.\s\sThe\sstring\svalue\nis\sthe\svalue.\s\sIf\syou\scan't\sdo\swhat\syou\sneed\nwith\sthe\sstring\svalue\salone\s(plus\spossibly\ssome\nstate\syou've\sarranged\sto\sassociate\swith\sthe\sinterp),\nthen\sat\sbest\syou\shave\san\sabuse\sof\sthe\sTcl_Obj\ssystem,\nwhich\smight\swork\sif\syou\stake\sspecial\scare\sand\sjump\nthrough\ssome\shoops,\sbut\sisn't\sthe\ssupported\smodel.\n\nOne\shoop\syou\scan\sjump\sthrough\sthat\swill\shelp\savoid\nthis\sissue\sis\sto\scraft\sstring\sreps\sthat\sare\snot\nvalid\svalues\sof\sother\sknown\sTcl_ObjTypes.\n\nFinally,\sback\sto\syour\soriginal\spost,\sit\smay\swell\sbe\nthat\syou\scan\savoid\sthe\simmediate\sproblem\sby\susing\sthe\n"eq"\soperator\sinstead\sof\sthe\s"=="\soperator:\n\nset\sa\s...\nset\sb\s...\nif\s{$a\seq\s$b}\s{...}\n\n
J login dgp
J mimetype text/plain
J status Closed
J username dgp
K 1893052fffffffffffffffffffffffffffffffff
U dgp
Z c618b01eef3f75528c5c965d182ca32e