Shop OBEX P1 Docs P2 Docs Learn Events
FSRW Carriage return issue — Parallax Forums

FSRW Carriage return issue

Ad_Astra_88Ad_Astra_88 Posts: 2
edited 2010-01-25 16:51 in Propeller 1
I'm sorry if someone has answered this question before, but I couldn't find reference to it in the forums. Using either the John Twomey or Tomas Rokicki versions of fsrw, 13 doesn't generate a carriage return in the file when used as:

fsrw.pputc(13)

Even in the test file "sdrw_test.spin" provided in the John Twomey download, which is meant to create a file with three lines each containing "R" 39 times, I get one line, containing "R" 117 times. Using 9 does generate a tab however, so that character code is working, and 13 still generates a carriage return when talking with a terminal, so I can't seem to determine why it doesn't in the file being written to. Any help would be greatly appreciated.

Comments

  • ry.davidry.david Posts: 63
    edited 2010-01-25 16:36
    Are you using notepad to view the files?· Someone correct me if I am wrong, but I believe notepad looks for a CR and a LF for a new line.· Excel or Wordpad will display the file as expected.
  • Ad_Astra_88Ad_Astra_88 Posts: 2
    edited 2010-01-25 16:42
    You're quite right! Thanks very much, I never knew that.
  • Forest GodfreyForest Godfrey Posts: 38
    edited 2010-01-25 16:51
    There has long been two "standards" on what you use to terminate a line. Unix (and MacOS X) use just a line feed (ASCII code 10) whereas Windows wants to see a carriage return and a line feed (13 and 10). Some programs auto-convert and hide it for you and some don't. Terminal programs will usually convert for you. There's a decent reference on this mess here: http://kb.iu.edu/data/acux.html
Sign In or Register to comment.