|
Post by Alyce on Jan 16, 2008 8:42:26 GMT -5
Stefan added a semi colon to a print statement made to a binary file. He said , "added semicolon at the end of the output line to prevent corrupting files by adding CRLF at the end" runbasic.wikispaces.com/UploadAndMoveI did not realize that a CRLF was added when you printed to a file opened "for binary". I did know it was added when a file is opened "for output". I can find nothing about this in the tutorial. In the list of statements and functions, I find this, but no other info: OPEN expr$ FOR mode AS #handle - Open a file #handle using expr$ and mode I don't expect a CRLF to be added to print statements when data is written to a binary file. I've put this on the code board for clarification, but I wonder if it is a bug in binary access file handling?
|
|
|
Post by StefanPendl on Jan 16, 2008 18:29:34 GMT -5
I just checked and if I remove the semicolon, the copied file gets 1 byte bigger, than the original.
The HEX editor showed that without the semicolon, a CR is added to the end of the file.
|
|
|
Post by Jerry Muelver on Jan 16, 2008 19:01:19 GMT -5
Just the CR, no LF? But CRLF in project source files saved from IDE, or somesuch that gives us extra line-ends in external editors, and use LF for line breaks in NOTICE boxes.... Whatever happened to "Line endings in Windows and DOS are always CRLF, in Macintosh are CR, and *nix are LF". Are we Brodignabians supposed to start on the small end, or the big end, of the egg?
|
|