• Welcome to Valhalla Legends Archive.
 

[VB6] Writing to file without writing CRLF?

Started by Joe[x86], November 27, 2005, 01:39 PM

Previous topic - Next topic

Joe[x86]

Yup. I'm trying to add BNFTP to JBBE, but of course, Print #FileNum, m_sData outputs a CRLF after whats written. Anyone know how to write without that CRLF?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Warrior

Question: Why do you preapend topics with language namesin a forum specifically for that language?
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Mangix

Quote from: Joe on November 27, 2005, 01:39 PM
Yup. I'm trying to add BNFTP to JBBE, but of course, Print #FileNum, m_sData outputs a CRLF after whats written. Anyone know how to write without that CRLF?
dont use Print?

rabbit

Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Joe[x86]

Quote from: Mangix on November 27, 2005, 03:46 PM
Quote from: Joe on November 27, 2005, 01:39 PM
Yup. I'm trying to add BNFTP to JBBE, but of course, Print #FileNum, m_sData outputs a CRLF after whats written. Anyone know how to write without that CRLF?
dont use Print?
How informative!
Quote from: rabbit on November 27, 2005, 08:06 PM
Use Put.
Thanks.
Quote from: Warrior on November 27, 2005, 02:56 PM
Question: Why do you preapend topics with language namesin a forum specifically for that language?
There's an odd chance that VB5 or VB4 are still in use. Well, more out of habit, but still..
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Stealth

#5
Add a semicolon after your Print statement:

Print #f, "Your name is ";
Print #f, TheirName;
Print #f, "."
'Result: "Your name is Joe."


It works after variables, too. Don't use Put -- Put is designed for random and binary file access.
- Stealth
Author of StealthBot

rabbit

He's trying to write files, not text, in which case he should be using binary anyway.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Joe[x86]

Quote from: Stealth on November 29, 2005, 02:39 PM
Add a semicolon after your Print statement:

Print #f, "Your name is ";
Print #f, TheirName;
Print #f, "."
'Result: "Your name is Joe."


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

Duh! Thanks.

Quote from: rabbit on November 29, 2005, 05:30 PM
He's trying to write files, not text, in which case he should be using binary anyway.

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.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.