What is CRLF?

Discussion in 'ASP General' started by eddie wang, Mar 3, 2004.

  1. eddie wang

    eddie wang Guest

    What is CRLF? Thanks.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    eddie wang, Mar 3, 2004
    #1
    1. Advertising

  2. eddie wang

    Ray at Guest

    Carriage Return + Line Feed

    Ray at work

    "eddie wang" <> wrote in message
    news:...
    >
    >
    > What is CRLF? Thanks.
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Ray at, Mar 3, 2004
    #2
    1. Advertising

  3. Carriage return / line feed. char(13) + char(10).


    "eddie wang" <> wrote in message
    news:...
    >
    >
    > What is CRLF? Thanks.
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    William Morris, Mar 3, 2004
    #3
  4. eddie wang

    Rob Meade Guest

    "eddie wang" wrote...

    > What is CRLF? Thanks.


    CRLF = Carriage Return Line Feed

    Effectively hitting the return key twice, thus leaving an empty line between
    text.

    You can use it in ASP with vbScript like so :

    <%
    strText = "This is my first sentance" & vbCRLF
    strText = strText & "This is my second sentance"

    Response.Write strText
    %>

    Hope this helps,

    Regards

    Rob
     
    Rob Meade, Mar 3, 2004
    #4
  5. eddie wang

    Evertjan. Guest

    Rob Meade wrote on 03 mrt 2004 in
    microsoft.public.inetserver.asp.general:

    > CRLF = Carriage Return Line Feed
    >
    > Effectively hitting the return key twice, thus leaving an empty line
    > between text.
    >


    Nonsense. only 1.

    The old teletype apparatus had seperate "characters" for the linefeed
    [=advancing the paper roller 1 row] and the carriage return [=sending the
    carriage with all the letter hammers back to the first position]

    The order of first Cr and then Lf was extremely important, because the
    time it took to return was covered by the Lf time [ 5+2 bits at 45.45
    baud.]
    If they were reversed the first letter of the next line was printed
    somewhere in the middle of the line and subsequent letters as a line over
    it.

    Some operating system definitions [like Windows?] still define the
    combination as the new paragraph signal in ascii text. Others [Linux,
    Unix, Amiga] only use the Lf.

    VBscript has all 3 defined as constants:

    VbCr = ascii decimal 13 = hex 0C
    VbLf = ascii decimal 10 = hex 0A
    VbCrLf = VbCr & VbLf

    But I repeat, only 1 touch of the <return> key is necessary.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Mar 3, 2004
    #5
  6. eddie wang

    Rob Meade Guest

    Oops...

    Yeah ok, put those lighters down "flame boys" :eek:)

    My use of the old vbCRLF is typically when constructing emails being sent
    from ASP, usually I'd pop 2 of them on the end of a line to leave a space -
    clearly got carried away with the thought of posting something helpful - and
    then failing :eek:/

    Thank you also for pointing out my illiteracy skills...

    Regards

    Rob
     
    Rob Meade, Mar 3, 2004
    #6
  7. eddie wang

    Tim Slattery Guest

    "Rob Meade" <> wrote:

    >"eddie wang" wrote...
    >
    >> What is CRLF? Thanks.

    >
    >CRLF = Carriage Return Line Feed
    >
    >Effectively hitting the return key twice, thus leaving an empty line between
    >text.


    Nope, in DOS and Windows a CRLF is a single line break. To get an
    empty line between lines of text (double-space) you'd need two of
    them: CRLFCRLF

    --
    Tim Slattery
    MS MVP(DTS)
     
    Tim Slattery, Mar 3, 2004
    #7
  8. eddie wang

    Jeff Cochran Guest

    On Wed, 03 Mar 2004 10:09:13 -0800, eddie wang <> wrote:

    >What is CRLF? Thanks.


    And to expand yet some more:

    CR is a return of the carriage to the first character position, if you
    only did this each line would print over the top of the previous one.

    LF is to feed the paper one line's height so the above doesn't happen.
    But if you don't return the carriage to the home character then you
    end up with stair-stpe text.

    It's interpreted differently between DOS and UNIX systems as well, in
    a DOS/Windows system a CR includes a LF, but Unix systems keep them
    separate. You may run into this in some data files where the
    DOS/Windows lack of a LF can screw up dipslays on some older Unix
    systems (Virtually all current implementations got intelligent).

    In ASP code, it's often used in a VbCrLf format, after a
    Response.Write or other statement. Such as:

    Response.Write "This is text" & VbCrLf
    Response.Write "This is more text" & VbCrLf

    This way, a View Source shows:

    Response.Write "This is text"
    Response.Write "This is more text"

    Otherwise you'd see the code as:

    Response.Write "This is text"Response.Write "This is more text"

    Handy for readability and debugging, as is the use of the &_ to break
    single-line statements over multiple lines in the code.

    Jeff
     
    Jeff Cochran, Mar 3, 2004
    #8
  9. "eddie wang" wrote:
    >
    > What is CRLF? Thanks.





    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Mar 3, 2004
    #9
  10. "Peter Foti" wrote:
    >>
    >> CRLF = Carriage Return Line Feed
    >>
    >> Effectively hitting the return key twice, thus leaving
    >> an empty line between text.

    >
    > Wrong. Effectively hitting the return key once, thus leaving no
    > empty line between text.


    More like hitting [Enter] than [Return]. And yes, some of us have separate
    [Enter] and [Return] keys. On our Macs, anyway.


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Mar 3, 2004
    #10
  11. "Dave Anderson" <> wrote in message
    news:...
    > "eddie wang" wrote:
    > >
    > > What is CRLF? Thanks.

    >
    >
    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per

    message. Use
    > of this email address implies consent to these terms. Please do not

    contact
    > me directly or ask me to contact you directly for assistance. If your
    > question is worth asking, it's worth posting.


    lol. :)
     
    Chris Hohmann, Mar 3, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry III

    Re: how to check CRLF in C#

    Jerry III, Aug 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    831
    Jerry III
    Aug 25, 2003
  2. Kevin Spencer

    Re: how to check CRLF in C#

    Kevin Spencer, Aug 25, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    28,041
    Jerry III
    Aug 27, 2003
  3. Simon Chung-Jen Chuang

    Re: how to check CRLF in C#

    Simon Chung-Jen Chuang, Aug 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    Simon Chung-Jen Chuang
    Aug 26, 2003
  4. Jack Wright

    Problem in CRLF in multiline fields

    Jack Wright, Apr 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    409
    Jack Wright
    Apr 21, 2004
  5. Michael Persaud

    CRLF How does it work for asp.net???!!

    Michael Persaud, May 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,992
    Michael Persaud
    May 27, 2004
Loading...

Share This Page