BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New line character

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
melissa
Guest





PostPosted: Fri Sep 02, 2005 11:47 pm    Post subject: New line character Reply with quote




I am having a really hard time getting my program to print a new line character to a text file. The relevant line of code is as follows:

strLogData += (AnsiString) 'n';

This looks simple enough, however, this line of code does not enter a new line character. I've tried 'r' as well, but it still doesn't work. It enters tab spaces just fine, just not a new line character.

Anything someone can suggest?

Thanks!
Back to top
Jonathan Benedicto
Guest





PostPosted: Fri Sep 02, 2005 11:59 pm    Post subject: Re: New line character Reply with quote



"melissa" <mel_121181 (AT) hotmail (DOT) com> wrote

Quote:
I am having a really hard time getting my program to print a
new line character to a text file. The relevant line of code is
as follows:

This looks simple enough, however, this line of code does
not enter a new line character. I've tried 'r' as well, but it
still doesn't work. It enters tab spaces just fine, just not a
new line character.

Are you using Notepad to view the files ? The Windows line ending is rn,
so you'd need to do this:

strLogData += "rn";

HTH

Jonathan



Back to top
Melissa
Guest





PostPosted: Sat Sep 03, 2005 12:45 am    Post subject: Re: New line character Reply with quote




"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote:
Quote:
"melissa" <mel_121181 (AT) hotmail (DOT) com> wrote in message
news:4318e4ac$1 (AT) newsgroups (DOT) borland.com...
I am having a really hard time getting my program to print a
new line character to a text file. The relevant line of code is
as follows:

This looks simple enough, however, this line of code does
not enter a new line character. I've tried 'r' as well, but it
still doesn't work. It enters tab spaces just fine, just not a
new line character.

Are you using Notepad to view the files ? The Windows line ending is rn,
so you'd need to do this:

strLogData += "rn";

HTH

Jonathan




Thank you so much! That worked.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.