At 08:31 AM 4/3/2001, you wrote:
>After File_Open_Write("...") the commands
> Goto_Pos(XXX) Line(1,...)
>appear before the commands
> File_Write(0) File_Truncate(OK)
>
>to write and close the segment of size XXX above. In a binary file (not line-oriented text), it looks as though the Line() command will move the edit position to the next 0x0A or 0x0D it finds past position XXX, so that the actually amount written more than XXX and cannot be fixed. Am I interpreting this correctly?
No. Binary files are typically edited by setting a fixed-length record size, e.g. "64" with {CONFIG, File handling, File type}. Line() then advances to the beginning of the next record. This ensures that fixed-length record files are split between records.
However, if you are trying to edit a binary file in a text mode, e.g.
File type of "0", then Line() would be unpredictable. We always recommend
editing binary files by setting a fixed-length record size.
Ted.
|
|