How to write files without carriage returns? 
Author Message
 How to write files without carriage returns?

I need to write some files that ONLY contain line feeds.  VB seems to insist in
adding carriage returns whenever a string is printed, even in binary.  Is there
any way to supress this automatic feature so a line like this:

        print #1, "My text" & vblf

will print without ANY added bytes?  Thanks.



Sun, 24 Jun 2001 03:00:00 GMT  
 How to write files without carriage returns?
Your line is almost ok, except for one little semi-column:
try this:
print #1, "My text" & vblf;

Jacco.


Quote:

>I need to write some files that ONLY contain line feeds.  VB seems to
insist in
>adding carriage returns whenever a string is printed, even in binary.  Is
there
>any way to supress this automatic feature so a line like this:

> print #1, "My text" & vblf

>will print without ANY added bytes?  Thanks.



Sun, 24 Jun 2001 03:00:00 GMT  
 How to write files without carriage returns?

Quote:

>I need to write some files that ONLY contain line feeds.  VB seems to
insist in
>adding carriage returns whenever a string is printed, even in binary.  Is
there
>any way to supress this automatic feature so a line like this:

> print #1, "My text" & vblf

Use WRITE instead of PRINT


Sun, 24 Jun 2001 03:00:00 GMT  
 How to write files without carriage returns?
Use binary mode and the PUT statement.

Put #1,,"My text" & vblf

Quote:

> I need to write some files that ONLY contain line feeds.  VB seems to insist in
> adding carriage returns whenever a string is printed, even in binary.  Is there
> any way to supress this automatic feature so a line like this:

>         print #1, "My text" & vblf

> will print without ANY added bytes?  Thanks.



Sun, 24 Jun 2001 03:00:00 GMT  
 How to write files without carriage returns?
Hi,

try this:

print #1, "My text" & chr$(10)

I'm sure it works

Hans-Hermann


Quote:

>I need to write some files that ONLY contain line feeds.  VB seems to
insist in
>adding carriage returns whenever a string is printed, even in binary.  Is
there
>any way to supress this automatic feature so a line like this:

> print #1, "My text" & vblf

>will print without ANY added bytes?  Thanks.



Sun, 24 Jun 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Print without carriage return

2. Saving Text without Return Carriage

3. print line without carriage return

4. How to use the print function without writing a return in the file

5. carriage returns on the clipboard (and into write)

6. How do I write # to a txt file without carriage returns?

7. Deleting Last Carriage Return from Text File

8. REG files don't merge TAB and carriage returns

9. newbie: strip the carriage returns from a text file

10. REG files don't merge TAB and carriage returns

11. REG files don't merge TAB and carriage returns

12. Need help! Using Execute method to get a text file from a unix box, the carriage return in the returned file is missing

 

 
Powered by phpBB® Forum Software