Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to insert Carriage return line feed into a file

Status
Not open for further replies.

dbsquared

Programmer
Nov 7, 2002
175
0
0
US
I am writing to a file a name what I want to do after I write the name to the file is put a carriage return line feed to make sure I go to the next line.
I have looked throught the site and found nothing that helps.
I also can't find anything in the help files.
I'm sure this is simple but it has me at a loss.
Thanks

To go where no programmer has gone before.
 
If you use the TEXT flag with the fopen command, you can use fputs (I imagine you are using fwrite now), which automatically adds the CR/LF at the end of the written string. Another thing you can do is add `r`n (that's a backtick located in the upper left corner of your keyboard, not an apostrophe) which is the representation of a CR and LF in ASPECT.


aspect@aspectscripting.com
 
Thanks
the fputs works I'll have to do more testing to get it in the exact format that I want.
I appreciate it.

To go where no programmer has gone before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top