ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Character (13) (https://www.excelbanter.com/excel-programming/321041-character-13-a.html)

Hari[_3_]

Character (13)
 
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India



Nick Hodge

Character (13)
 
Hari

Chr(10) as you point out is Linefeed
Chr(13) is carriage return and linefeed

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India





Rob van Gelder[_4_]

Character (13)
 
Back in the days of typewriters, getting to the next line involved two
actions. These were scrolling the feeder and returning the carriage to the
starting position. LineFeed and Carriage Return (LF and CR)
When computers started using typewriters, these commands were still used.
On modern computers, they are still in use as a hangover from these days.

I think that only Microsoft Operating Systems use both LF and CR for a new
line. Others just use LF.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India





Hari[_3_]

Character (13)
 
Hi Nick and Rob,

Thnx a lot for your answers.

Rob - Thnx a ton for gving the historical perspective. Can appreciate it
better now.

--
Thanks a lot,
Hari
India
"Rob van Gelder" wrote in message
...
Back in the days of typewriters, getting to the next line involved two
actions. These were scrolling the feeder and returning the carriage to the
starting position. LineFeed and Carriage Return (LF and CR)
When computers started using typewriters, these commands were still used.
On modern computers, they are still in use as a hangover from these days.

I think that only Microsoft Operating Systems use both LF and CR for a new
line. Others just use LF.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2

stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India







Dave Peterson[_5_]

Character (13)
 
There are a couple of constants in xl that you may want to use:

vbLf (line feed)
vbCr (carriage return)
vbNewLine (new line)
VBCrLf (both cr & lf)

When I use msgboxes, I do things like:

msgbox "Hi" & vblf & "hari"

JE McGimpsey (an advocate of cross platform programming (and a typical Mac user
<vbg) recommends:

msgbox "hi" & vbnewline & "hari"

From the immediate window in the VBE:

?asc(vblf)
10

?asc(vbcr)
13

?len(vbcrlf)
2
?asc(left(vbcrlf,1))
13
?asc(right(vbcrlf,1))
10

?len(vbnewline)
2
?asc(left(vbnewline,1))
13
?asc(right(vbnewline,1))
10

vbNewLine is platform dependent. Under windows, it's 2 characters. Under Mac,
it's just one (IIRC, LF).

Hari wrote:

Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India


--

Dave Peterson

Hari Prasadh

Character (13)
 
Hi Dave,

Thnx a lot for instructive explanation using Imm.Window. Came to know about
it 2 days back and like the feature a lot.

--
Thanks a lot,
Hari
India

"Dave Peterson" wrote in message
...
There are a couple of constants in xl that you may want to use:

vbLf (line feed)
vbCr (carriage return)
vbNewLine (new line)
VBCrLf (both cr & lf)

When I use msgboxes, I do things like:

msgbox "Hi" & vblf & "hari"

JE McGimpsey (an advocate of cross platform programming (and a typical Mac

user
<vbg) recommends:

msgbox "hi" & vbnewline & "hari"

From the immediate window in the VBE:

?asc(vblf)
10

?asc(vbcr)
13

?len(vbcrlf)
2
?asc(left(vbcrlf,1))
13
?asc(right(vbcrlf,1))
10

?len(vbnewline)
2
?asc(left(vbnewline,1))
13
?asc(right(vbnewline,1))
10

vbNewLine is platform dependent. Under windows, it's 2 characters. Under

Mac,
it's just one (IIRC, LF).

Hari wrote:

Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2

stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India


--

Dave Peterson





All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com