Skip to content
Tcl Source Code Artifact [1e962ea4b4]
Login

Artifact [1e962ea4b4]

Artifact 1e962ea4b41220ed5570d223fd4b3f0c0e8b3ab1:

Ticket change [1e962ea4b4] - New ticket [1830450fffffffff|1830450fff] <i>open file treats a+ as a (append)</i>. by legolas_a20 on 2007-11-12 14:28:36.
D 2007-11-12T14:28:36
J assignee nobody
J cmimetype text/plain
J comment \nwhen\sopening\sa\sfile,\sspecifying\s"a+"\sas\smode\sacts\sjust\slike\s"a"\swhen\sit\scomes\sto\ssetting\sthe\sfile\spointer\sbefore\sa\sputs,\safter\sa\sseek.\sBoth\sact\slike\s"a",\swhich,\sas\sthe\sdocs\ssay:\s"Set\sthe\sfile\spointer\sto\sthe\send\sof\sthe\sfile\sprior\sto\seach\swrite."\s"A+"\sshould,\saccording\sto\sthe\sdocs\s"Set\sthe\sinitial\saccess\sposition\sto\sthe\send\sof\sthe\sfile."\n\nso\sif\sI\sopen\sf\swith\sa+,\sand\sthen\sdo:\n\n\s\sseek\s$f\s5\n\s\sputs\s-nonewline\s$f\s"qqq"\n\nthe\sqqq\sshould\send\sup\sat\sfile\sposition\s5.\sIt\sends\sup\sat\sfile\sposition\s'end'\sinstead.\n\nSee\sthe\sattachment\sfor\sa\sscript\sthat\sreproduces\sthis,\sand\sa\sworkaround:\susing\sRDWR\sas\smode\sworks\sas\s"a+"\sshould\swork.\sThe\sscript\swrites\sa\sfile\scalled\stest.bin,\sand\sthen\sattempts\sto\supdate\sthe\smiddle\sof\sit\sas\sdescribed\sabove\s(and\sfails\sto\sdo\sthat\son\smy\s8.4.16\son\swindows\sxp\ssp2),\sfollowed\sby\sdoing\sthe\ssame\sthing\swith\sthe\sworkaround,\son\sa\sfile\snamed\stest2.bin\s(and\sthat\sdoes\swork).
J foundin obsolete:\s8.4.16
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter legolas_a20
J subsystem None
J title open\sfile\streats\sa+\sas\sa\s(append)
J type Bug
K 1830450fffffffffffffffffffffffffffffffff
U legolas_a20
Z c82f26719386c4d1a05d80fedb74876a