What is CRLF?

R

Rob Meade

...
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
 
E

Evertjan.

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.
 
R

Rob Meade

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
 
T

Tim Slattery

Rob Meade said:
...


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
 
J

Jeff Cochran

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
 
D

Dave Anderson

eddie wang said:
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.
 
D

Dave Anderson

Peter Foti said:
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.
 
C

Chris Hohmann

Dave Anderson said:
--
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. :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top