I have some strings I want to write to a file in VB6, I can write it fine but every time I do it adds a new line automatically after each write command.
Is there a function or a way to just write to the file without the automatic new line? Thanks.
I have some strings I want to write to a file in VB6, I can write it fine but every time I do it adds a new line automatically after each write command.
Is there a function or a way to just write to the file without the automatic new line? Thanks.
You can use a semicolon after the Write command, for example:
Write #handle, "Hello";
Write #handle, "world";
The advice to use the semicolon is correct, but you most likely don't want to use it in conjunction with Write #
, which will enclose your output in quotation marks. Use Print #
instead.
Print #handle, "Hello";
Print #handle, " world";