Valhalla Legends Forums Archive | Visual Basic Programming | [VB6] Writing to file without writing CRLF?

AuthorMessageTime
JoeTheOdd
Yup. I'm trying to add BNFTP to JBBE, but of course, [tt]Print #FileNum, m_sData[/tt] outputs a CRLF after whats written. Anyone know how to write without that CRLF?
November 27, 2005, 7:39 PM
Quarantine
Question: Why do you preapend topics with language namesin a forum specifically for that language?
November 27, 2005, 8:56 PM
Mangix
[quote author=Joe link=topic=13359.msg135494#msg135494 date=1133120363]
Yup. I'm trying to add BNFTP to JBBE, but of course, [tt]Print #FileNum, m_sData[/tt] outputs a CRLF after whats written. Anyone know how to write without that CRLF?
[/quote]dont use Print?
November 27, 2005, 9:46 PM
rabbit
Use Put.
November 28, 2005, 2:06 AM
JoeTheOdd
[quote author=Mangix link=topic=13359.msg135499#msg135499 date=1133127980]
[quote author=Joe link=topic=13359.msg135494#msg135494 date=1133120363]
Yup. I'm trying to add BNFTP to JBBE, but of course, [tt]Print #FileNum, m_sData[/tt] outputs a CRLF after whats written. Anyone know how to write without that CRLF?
[/quote]dont use Print?
[/quote]How informative![quote author=rabbit link=topic=13359.msg135513#msg135513 date=1133143586]
Use Put.
[/quote]Thanks.[quote author=Warrior link=topic=13359.msg135498#msg135498 date=1133124977]
Question: Why do you preapend topics with language namesin a forum specifically for that language?
[/quote]There's an odd chance that VB5 or VB4 are still in use. Well, more out of habit, but still..
November 28, 2005, 3:26 AM
Stealth
Add a semicolon after your Print statement:

[code]Print #f, "Your name is ";
Print #f, TheirName;
Print #f, "."
'Result: "Your name is Joe."[/code]

It works after variables, too. Don't use Put -- Put is designed for random and binary file access.
November 29, 2005, 8:39 PM
rabbit
He's trying to write files, not text, in which case he should be using binary anyway.
November 29, 2005, 11:30 PM
JoeTheOdd
[quote author=Stealth link=topic=13359.msg135732#msg135732 date=1133296792]
Add a semicolon after your Print statement:

[code]Print #f, "Your name is ";
Print #f, TheirName;
Print #f, "."
'Result: "Your name is Joe."[/code]

It works after variables, too. Don't use Put -- Put is designed for random and binary file access.
[/quote]

Duh! Thanks.

[quote author=rabbit link=topic=13359.msg135754#msg135754 date=1133307029]
He's trying to write files, not text, in which case he should be using binary anyway.
[/quote]

Aparently I have to receive in an array from the socket, and then it makes reading the BNFTP header a real pain, and reading it both ways is even more of a pain, where this is easy to do.
November 30, 2005, 1:01 AM

Search