.
D 2009-11-22T06:04:02
J icomment Looking\sin\sdetail\sat\syour\sexample,\sI'm\sa\sbit\ssurprised\sby\syet\sanother\seffect\sof\sthis\sinternal\sI/O\sconflict:\s\s\safter\sthe\s1-byte\s[puts],\sif\swe\sask\s[tell]\s(which\syour\sexample\sdoesn't\sdo),\swe\sget\s1\sof\scourse.\sBut\sthen,\sat\sscript\slevel,\show\sdo\swe\sexplain\sthe\sfact\sthat\sthe\ssubsequent\s[read]\sstarts\sfrom\sthe\sbeginning\sof\sthe\sfile\s?\n\nIn\sother\swords,\sif\swe\sforget\sabout\sthe\sunderlying\sOS\sfile\sposition\sand\sconcentrate\son\sthe\sonly\sTcl-visible\sthing\swhich\sis\swhat\s[tell/seek]\smanipulate,\sit\sseems\sonly\slogical\sto\sassume\sit\sis\s*both*\sa\sread\sand\swrite\spointer\s(otherwise\swe'd\sneed\sextra\sAPI\sto\sseparate\sthem).\sThen\safter\swriting\sone\sbyte\swe're\sat\sposition\s1,\sand\sthe\ssubsequent\s[read\s2]\sshould\sread\sfrom\sthat\sposition,\sand\shence\sreturn\sthe\s2nd\sand\s3rd\sbyte\sof\sthe\sfile\s("0a"\shere).\n\nOf\scourse\sthe\simplication\sof\ssuch\sa\ssemantics\sis\sthat\sa\sread\smight\sincur\sa\sflush\s(otherwise\scostly\soverlap\scomputations\sare\sneeded).\sSo\swhat\s?\n\nApart\sfrom\sthe\sPOTENTIAL\sINCOMPATIBILITY,\s\swhat's\swrong\swith\ssuch\sa\ssimplified\s"Tcl\sr/w\sfile\spointer"\sconcept\s?\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 2176669fffffffffffffffffffffffffffffffff
U ferrieux
Z 7997b4f60aaa298ed25bf7dfa5b28f56