Click to See Complete Forum and Search --> : Reading "\t" and "\n" from a text file


kphillip
February 5th, 2002, 04:22 PM
Hi,

I am reading strings from a text file. I've entered characters such as \t and \n in the text file to act as tab and newline characters. However when I read the strings from a text file and display them in the application, "\t" and "\n" are displayed rather than the cursor being tabbed or starting on a newline.

Why is this and how can I implement tab and newline characters in the text file?

Thanks for any help,

Kim Phillip

qg89944
February 5th, 2002, 08:57 PM
If you type a text file mannually and want to have tabs and new lines, just use the tab key or the Enter key on the keyboard. You don't need to type in "\t", "\n". Otherwise, they will be read as what they are displayed in the text file.

When you generate a text file programmtically, you need to use "\t" or "\n" to create tab or new line in the output file.

Hope this answers your question.