By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 772 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

What is CRLF?

P: n/a


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Carriage return / line feed. char(13) + char(10).
"eddie wang" <ew***@kmg.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

P: n/a
"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
Jul 19 '05 #3

P: n/a
Carriage Return + Line Feed

Ray at work

"eddie wang" <ew***@kmg.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4

P: n/a
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)
Jul 19 '05 #5

P: n/a
"Rob Meade" <ro********@NO-SPAM.kingswoodweb.net> wrote in message
news:Ye**********************@news-text.cableinet.net...
"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.

Wrong. Effectively hitting the return key once, thus leaving no 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
%>

The result of the above would look something like this:
This is my first sentance
This is my second sentance

Note, there is no extra line between the two.
Regards,
Peter Foti
PS- Incorrect spelling of sentence left in to match the example above. :)

Jul 19 '05 #6

P: n/a
Yeah ok, put those lighters down "flame boys" :o)

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 :o/

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

Regards

Rob
Jul 19 '05 #7

P: n/a
"Rob Meade" <ro********@NO-SPAM.kingswoodweb.net> wrote in message
news:Zn**********************@news-text.cableinet.net...
Yeah ok, put those lighters down "flame boys" :o)

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 :o/

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


LOL! Hey, we all make mistakes. :)

Best,
Peter
Jul 19 '05 #8

P: n/a
"Rob Meade" <ro********@NO-SPAM.kingswoodweb.net> 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)
Sl********@bls.gov
Jul 19 '05 #9

P: n/a
On Wed, 03 Mar 2004 10:09:13 -0800, eddie wang <ew***@kmg.com> 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
Jul 19 '05 #10

P: n/a
"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.
Jul 19 '05 #11

P: n/a
"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.
Jul 19 '05 #12

P: n/a
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
"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. :)
Jul 19 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.