The number system can be transformed into
2 Base number
16 Base number
10 Base number
Encoding and decoding can be transformed into
ASCII Code table range
0x41-0x5A
This range is Big
Write letters 0x61-0x7A
This range is Small
Write letters 0x30-0x39
This range is Numbers
0x30
Just get the number itself 0x20-0x7F
There are various symbols between 0x00-0x1F
What is the thing between ?Write a document
:%!xxd
:%!xxd -r
Change back You can see that the file is in 2 Base number
Mode stored
be aware hello world
hinder \n
Why? ?
hello world
hinder \n
Why? ?\
It's called a backslash \n
What is it ??# Output \n
print("\n")
# direct print
print()
# Look at the ordinal number
ord("\n")
# Check the hexadecimal serial number
hex(ord("\n"))
two
That's ok \n
Words , Change only One
That's ok \n
As a whole as a character
10
)10 Base number
0x0A
)16 Base number
10
It's hexadecimal 0x0A
ascii
The code table means LF
Search for \n
The result is like this
\n
Change your career ?# Output string with \n
print("Hello\nWorld")
# Output string with \n
print("He\nllo\nWor\nld")
Obviously this \n
It's just a line feed
\n
It means you need to change 1 That's ok Line Feed
New 1 That's ok
At the beginning, paragraphs are divided by outputting spaces and then wrapping
L
ineF
eed Very efficient # Output ascii The value is 10 The characters of
chr(10)
# Put this character in print It outputs
print("hello"+chr(10)+"world")
Earliest c Language
Medium \n
From what ?
B Language
B Language
It was first developed by rich and Thompson unix
Language bell laboratory
Of PDP-8
On B Language
1971 Since, for B Language
To transform
PDP-11
On the use of B
to B
Write extensions , be called NewB
c Language
PDP-11
Rewritten a Unix Kernel
c Language
The program can be used in Any architecture
On the processor
c Language compilers and Libraries
c Language
The reason why it could develop at that time B Language
Nor was it created out of thin air B Language comes from BCPL(Basic Combined Programming Language)
Matin Richards
Make CPL Language
Improved from BCPL
It was first used as the of Oxford University OS6 operating system
The above development tools Later, through the improvement and promotion of Bell Laboratories in the United States, it became UNIX
Common development languages on
BCPL
The language looks like this This is the newline character at that time
\n
It's line changing
ascii
The code of the character is (10
)10 Base number
Line Feed
So I can freely control where to change my line !