D 2011-05-25T14:22:41 J icomment One\smore\sthing,\swhen\sI\ssay\s"the\sstdout\svalue",\sclearly\syou\shave\sto\sbe\screative\sto\sput\syour\shands\son\sall\sof\sthem.\sTo\sanalyse\sto\swhat\sextent\sthe\sliteral\sis\sshared,\slook\sat\sthe\sTcl_Obj\spointer.\sThe\sfollowing\sexperiment\sat\sscript\slevel\ssuggests\sthat\sreasonable\ssharing\scan\sbe\sexpected\sat\sleast\swith\sprocs\sand\sconstant\s"stdout":\n\n%\sproc\sf\s{}\s{dputs\sstdout\sA}\n%\sproc\sg\s{}\s{dputs\sstdout\sB}\n%\sproc\sdputs\s{ch\ss}\s{\n\s\s\sputs\s$ch\s$s;puts\sREPR:[::tcl::unsupported::representation\s$ch]\n}\n%\sf\nA\nREPR:value\sis\sa\schannel\swith\sa\srefcount\sof\s5,\sobject\spointer\sat\s0x8b66560,\sinternal\srepresentation\s0x8b62180:0x8b38f58,\sstring\srepresentation\s"stdout".\n%\sg\nB\nREPR:value\sis\sa\schannel\swith\sa\srefcount\sof\s6,\sobject\spointer\sat\s0x8b66560,\sinternal\srepresentation\s0x8b62180:0x8b38f58,\sstring\srepresentation\s"stdout".\n\n J login ferrieux J mimetype text/plain J username ferrieux K 3307281fffffffffffffffffffffffffffffffff U ferrieux Z d58230f9dcfbaeb6dc15e0a82b34d233