is carriage return chr(13) or chr(32) 
Author Message
 is carriage return chr(13) or chr(32)

I try and append chr(13) or chr(32) onto the end of my string to break it up
but it does not apply it for some reason example of how I am doing it
follows

teststring = "this is a test  " +chr(13) +chr(13)
teststring = teststring + "this is another string" +chr(13)+chr(13)

response.write teststring
Thanks David



Tue, 23 Mar 2004 21:02:26 GMT  
 is carriage return chr(13) or chr(32)
Hi David,
        chr(13) is carriage return and chr(10) is linefeed.  I would also
use the '&' instead of the '+'.  I hope this helps.

Bob Holmes


Quote:
> I try and append chr(13) or chr(32) onto the end of my string to break it
up
> but it does not apply it for some reason example of how I am doing it
> follows

> teststring = "this is a test  " +chr(13) +chr(13)
> teststring = teststring + "this is another string" +chr(13)+chr(13)

> response.write teststring
> Thanks David



Tue, 23 Mar 2004 20:21:04 GMT  
 is carriage return chr(13) or chr(32)
It is chr(13), but you need LF (linefeed) also to get a new line, but why not
use the built in constant vbCrLf ?

Also you should use & and not + for sring concatenation (its safer!)

This works :-)
teststring = "this is a test" & chr(13) & chr(10)
teststring = teststring & "this is another string" & vbCrLf
teststring = teststring & "this is a third string"
WScript.Echo teststring

Regards,
Torgeir

Quote:

> I try and append chr(13) or chr(32) onto the end of my string to break it up
> but it does not apply it for some reason example of how I am doing it
> follows

> teststring = "this is a test  " +chr(13) +chr(13)
> teststring = teststring + "this is another string" +chr(13)+chr(13)

> response.write teststring
> Thanks David



Tue, 23 Mar 2004 20:20:11 GMT  
 is carriage return chr(13) or chr(32)
If you're looking for the line break in output to a webpage, you need to use
the html break tag "<br>"
i.e

strBR = "<br>"
teststring = "this is a test  " & strBR & strBR
teststring = teststring & "this is another string" & strBR & strBR
Response.Write teststring


Quote:
> I try and append chr(13) or chr(32) onto the end of my string to break it
up
> but it does not apply it for some reason example of how I am doing it
> follows

> teststring = "this is a test  " +chr(13) +chr(13)
> teststring = teststring + "this is another string" +chr(13)+chr(13)

> response.write teststring
> Thanks David



Tue, 23 Mar 2004 22:57:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. INPUT OR READ TO STRIP CHR(10) AND CHR(13)

2. chr(10) and chr(13) in memofield gives |

3. Chr(10) & Chr(13)

4. Chr(10) and Chr(13) doesn't work

5. What is chr$(13) + chr$(10)

6. vbCRLF = chr(13) + chr(10)

7. Detect Return ( Chr(13) ) in a textarea

8. Inserting Returns with code vbCr or Chr(13)

9. Adding chr$(13) (return) to a text box??

10. Chr(13)

11. Replacing the Chr(13) with Javascript

12. Chr(13)

 

 
Powered by phpBB® Forum Software