Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > What is CRLF?

Reply
Thread Tools

What is CRLF?

 
 
eddie wang
Guest
Posts: n/a
 
      03-03-2004


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      03-03-2004
Carriage Return + Line Feed

Ray at work

"eddie wang" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> What is CRLF? Thanks.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
William Morris
Guest
Posts: n/a
 
      03-03-2004
Carriage return / line feed. char(13) + char(10).


"eddie wang" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> What is CRLF? Thanks.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Rob Meade
Guest
Posts: n/a
 
      03-03-2004
"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


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      03-03-2004
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)
 
Reply With Quote
 
Rob Meade
Guest
Posts: n/a
 
      03-03-2004
Yeah ok, put those lighters down "flame boys" )

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 /

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

Regards

Rob


 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      03-03-2004
"Rob Meade" <(E-Mail Removed)> 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)
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      03-03-2004
On Wed, 03 Mar 2004 10:09:13 -0800, eddie wang <(E-Mail Removed)> 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
 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      03-03-2004
"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.


 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      03-03-2004
"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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments