×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Location
    France
    Posts
    124

    Carriage return in file writing

    Hello,

    I am writing some information in a text file, but I don't know how to make a carriage return. In fact, when I use the method Write(..), the text is in the same line.

    Code:
    RFile fileSave;
    fileSave.Create(fsSession, name, EFileWrite);
    ...   
    fileSave.Write(tufPtr8);
    fileSave.Write(bafPtr8); //Add the text in the same line as before
       
    fileSave.Close();
    Thank you very much,

    Bernie

  2. #2
    Regular Contributor
    Join Date
    Oct 2005
    Location
    London, UK
    Posts
    235

    Re: Carriage return in file writing

    Perhaps a little late for you, but maybe useful for future searchers. Anyway,

    You need to write a "carriage return" to the file explicitly.

    So,

    Code:
    _LIT(KReturn, "\r\n");
    However, _LIT is 16-bit and the RFile::Write() takes a 8-Bit descriptor as an argument, so it should be;

    Code:
    _LIT8(KReturn, "\r\n");
    Regards,
    ViruDoshi
    ~ No Style Without Substance ~

Similar Threads

  1. abnormal exit caused by file writing
    By sinbaski in forum Symbian
    Replies: 2
    Last Post: 2006-01-10, 05:10
  2. Regarding carriage return
    By devesh_symbian in forum Symbian
    Replies: 3
    Last Post: 2005-12-01, 12:01
  3. Replies: 6
    Last Post: 2005-10-03, 05:51
  4. How to make a carriage return?
    By chrishawaii in forum Symbian
    Replies: 4
    Last Post: 2005-06-01, 09:25
  5. 关于Float的问题,急死了,各位帮忙一下,谢谢!
    By show_up in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 4
    Last Post: 2004-08-17, 08:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×