Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-09

Meaning of "^M^J"

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

yu ping

I read a source file,found it writes "^M^J" to a output. I don't know what is it's meaning,
after test,I think it should be a return char,
my question is, where can i find defination of this?

Reply by email

Ralf A. Quint
to yu ping
yu ping wrote
I read a source file,found it writes "^M^J" to a output. I don't know what is it's meaning, after test,I think it should be a return char, my question is, where can i find defination of this?

It's simply the byte sequence 0Dh, 0Ah (or 0x0d, 0x0a of C aficionados, "Carriage Return"-"Line Feed") which is the end-of-line sequence for CP/M,DOS/Windows since the early '70s, and in contrast to Unix/Linux, which uses only a 0Ah, while at least the older Mac OS was using only a 0Dh to mark the end of a line in a text file...

Ralf

Reply by email

yu ping
to Ralf A. Quint

^A= 1
^b= 2
^c= 3
^d= 4
^e= 5
^f= 6
^g= 7
^h= 8
^i= 9
^j= 10
^k= 11
^l= 12
^m= 13
^n= 14
^o= 15
^p= 16
^q= 17
^r= 18
^s= 19
^t= 20
^u= 21
^v= 22
^w= 23
^x= 24
^y= 25
^z= 26

I wander how "^" symble works

2009/9/30 Ralf A. Quint :

Show quoted text 18 lines
At 08:48 PM 9/29/2009, yu ping wrote: > > I read a source file,found it writes "^M^J" to a output. > I don't know what is it's meaning, > after test,I think it should be a return char, > my question is, where can i find defination of this? It's simply the byte sequence 0Dh, 0Ah (or 0x0d, 0x0a of C aficionados, "Carriage Return"-"Line Feed") which is the end-of-line sequence for CP/M,DOS/Windows since the early '70s, and in contrast to Unix/Linux, which uses only a 0Ah, while at least the older Mac OS was using only a 0Dh to mark the end of a line in a text file... Ralf _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Ralf A. Quint
yu ping wrote 28 lines
^A= 1 ^b= 2 ^c= 3 ^d= 4 ^e= 5 ^f= 6 ^g= 7 ^h= 8 ^i= 9 ^j= 10 ^k= 11 ^l= 12 ^m= 13 ^n= 14 ^o= 15 ^p= 16 ^q= 17 ^r= 18 ^s= 19 ^t= 20 ^u= 21 ^v= 22 ^w= 23 ^x= 24 ^y= 25 ^z= 26 I wander how "^" symble works

It's a common abbreviation for the the 'Control' characters (decimal values 0-31, hex 00h-1Fh) in the ASCII alphabet representation. This should be the very basic of any programming introduction. A good online reference can be found at http://www.asciitable.com

Ralf

Reply by email