Windows and DOS are both perfectly happy with just '\n' (exception: Microsoft
Telnet). Some *NIX systems need "\r\n".
-----Original Message-----
From: Ryan Underwood <runderwo@MAIL.WIN.ORG>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Tuesday, November 17, 1998 2:23 AM
Subject: Re: Question
>It depends on the terminal. Most terminals will interpret a line feed as
>a CR/LF. The same holds true for a carriage return alone, in most cases.
>If a carriage return follows a linefeed, most terminals will strip it as
>well.
>
>> Are you sure windows and dos?
>> Because I've used c++ made on a computer made in 1990 I think. And I've
>> used it in windows and dos and all it needs is a \n.
>>
>> Stephen Wolfe wrote:
>> >
>> > > > Just curious but I have a newbie question.
>> > > > What does the \r do?
>> > >
>> > > If I recall my line termination sequences correctly, both of these are
>> > > from the age of teletypes, and the \n would (and still does) move the
>> > > cursor down one line (but retain its position in character #'s) and the
\r
>> > > will actually return the cursor to the begining of the line.
>> > >
>> > > One without the other is messy :)
>> >
>> > as i'm sure someone else will say, unix text files only need the \n
>> > (linefeed) at the end, whereas Windows (and DOS I think) use both the
>> > \r\n (carriage return followed by a linefeed). Having just a \n will
>> > work just fine on unix, but a Windows system, it would simply drop the
>> > cursor 1 row down. In fact, having thr \r in unix files screws them
>> > up..hence the need for the strip_string function that comes with oasis..
>> >
>> > siv
>> >
>> > +------------------------------------------------------------+
>> > | Ensure that you have read the CircleMUD Mailing List FAQ: |
>> > | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>> > +------------------------------------------------------------+
>>
>>
>> +------------------------------------------------------------+
>> | Ensure that you have read the CircleMUD Mailing List FAQ: |
>> | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>> +------------------------------------------------------------+
>>
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
> +------------------------------------------------------------+
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST