You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you open a file port and then change the data in the file, READ will only see changes to the data that are before what the end of file position was when the port was opened. Any data that is added on after the end of file, READ won’t see. The end-of-file position that is used by READ is not getting updated on WRITE.
It doesn’t matter if the port is opened in /seek mode or not, nor does it matter whether you use READ and WRITE or INSERT, APPEND and COPY. If you read data from the same file with a different port, whether or not the original port is still open, the new data is there.
> > write %file to-binary "Hello World!"
> > f: open/seek %file
> > to-string read/seek f 0
> > == "Hello World!"
> > write/seek f to-binary "a" 4 ; In range
> > write/seek f to-binary " Goodbye World!" 12 ; Out of range
> > to-string read/seek f 0
> > == "Hella World!" ; Original length - note the first change
> > to-string read/seek %file 0
> > == "Hella World! Goodbye World!" ; Correct data
CC – Data [ Version: alpha 31 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:alpha 55 ]
The text was updated successfully, but these errors were encountered:
; r3-a68write%user.r my-modified-settings-as-binary
; console gets odd code dump but expected is likely an unset! ; dump starts make port! so looks like the action! src ...
Submitted by: Steeve
If you open a file port and then change the data in the file, READ will only see changes to the data that are before what the end of file position was when the port was opened. Any data that is added on after the end of file, READ won’t see. The end-of-file position that is used by READ is not getting updated on WRITE.
It doesn’t matter if the port is opened in /seek mode or not, nor does it matter whether you use READ and WRITE or INSERT, APPEND and COPY. If you read data from the same file with a different port, whether or not the original port is still open, the new data is there.
CC – Data [ Version: alpha 31 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:alpha 55 ]
The text was updated successfully, but these errors were encountered: