 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
melissa Guest
|
Posted: Fri Sep 02, 2005 11:47 pm Post subject: New line character |
|
|
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
|
Posted: Fri Sep 02, 2005 11:59 pm Post subject: Re: New line character |
|
|
"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
|
Posted: Sat Sep 03, 2005 12:45 am Post subject: Re: New line character |
|
|
"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 |
|
 |
|
|
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
|
|