- ..clause 1..: What is the program?
- ..clause 2..: Simple grammar
- ..clause 3..: Clear meaning
- ..clause 4..: Calculate everything.
Here, for the person who challenges the program for the first time
I want to explain the outline of the program.
The program is the most basic method of moving the computer.
In the program, in general, it is called the programming language.
Use the language for the computer and operate the computer.
The programming language : the almost everyone even if it doesn't explain purposely here.
It knows it to be a language for the computer as knowledge.
However, being not able to understand the program easily : still.
It is because there are a lot of points different from the natural language in the programming language.
The natural language that we men uses is called a natural language.
In a word, understanding the difference between the programming language and the natural language :.
It becomes the first hurdle the programming is understood.
This chapter explains the difference of two languages through the concrete example.
The grammar of the programming language is simpler than that of the natural language as disagreeing of one eye.
For instance, look at the following example.
This program : to the screen It means the word called HELLO can be projected.REFLECT HELLO
Hello the said word can be projected onto the screen by this, and it becomes a meaning.& nbsp; [Konnichiha] it is possible projecting
In the part of speech used in the programming language, most is a verb and an object.
In the program ahead, it is an object, and [desu].
The verb is previously brought because the computer developed chiefly in the country of the sphere in English.
If the program ahead is translated into the natural language, it becomes as follows.
Project word "Hello" onto the screen.
When this two are compared, the simplicity of the grammar of the programming language is understood.
|Natural language||Project word "Hello" onto the screen.|
|Programming language||REFLECT HELLO|
|Japanese word||[Konnichiha] it is possible projecting|
By the way, even if you write to see the program ahead, and to project it in the programming language
There might be a person who noticed [tohadokonimo] not written on the screen, too.
This is already including screen [nino] it is possible to project ..significant...
When it is necessary to express it in accurate [made], it becomes as follows where it projects it.
Hello if it is this writing, the moved [wo] object can be changed.& nbsp; Screen it is possible projecting hello
Print on the printer this time if you rewrite it like this... printer it is possible to project.. hello.
Though it explained the grammar of the programming language is very simple in the foregoing paragraph
The difference between the programming language and the natural language is not only those.
The second is that the meaning of the programming language is clearer than that of the natural language.
There is no room where vagueness is generated at all, and a severe, clear meaning has been decided.
For instance, write the triangle, and think about the example.
Though the triangle can be written, and it is possible to hold and it passes enough if it is an other party of man
When it takes notice of the computer, the word triangle is too abstract.
Clearly, how is written the triangle according to what procedure?
Order it by the clear cut procedure without vagueness at all.
First of all, though it doesn't become when where it begins to write is not ordered
At that time, order for vagueness not to exist the position where.
Though latitude and the longitude are used if the position is perfectly specified on the earth
Milli how many and order milli how many and [de] from on the left of the screen to the right below as a looking like method this time.
Order where to draw the line next if the position written in the beginning is decided.
This position is written and the triangle can be written if becoming triangular shape.
The following are examples where it showed in an English programming language.
When this is made a Japanese programming language, it becomes the following.LINE 50,50 - 250,100 LINE 250,100 - 120,160 LINE 120,160 - 50,50
In addition, it becomes the following if it translates into usual Japanese.線 50,50 から 250,100 線 250,100 から 120,160 線 120,160 から 50,50
When it faithfully follows this procedure, the following images are written.画面左上から右に50ミリ、下に50ミリの位置から、 右に250ミリ、下に100ミリの位置まで線を引け。 画面左上から右に250ミリ、下に100ミリの位置から、 右に120ミリ、下に160ミリの位置まで線を引け。 画面左上から右に120ミリ、下に160ミリの位置から、 右に50ミリ、下に50ミリの位置まで線を引け。
The feature of the programming language is to order it by the clear cut procedure extremely in this manner.
There is no vagueness in the procedure at all, and when all operation is not ordered in [ku] in detail, it doesn't become it.
So that the computer may make [kappura-men] if you give another example
[Kappura-men] can be made, and, naturally, being possible to hold is insufficient.
Thrust out 90 time rotation and the hand forward of ten centimeters willingly and one meter right ･･･.
With long [wo] until the ramen is put water in taking out [yakan], ignited, and poured repeatedly
Man should inculcate all operation in details [ku].
Moreover, these operation only is operated mere and exists for the computer.
Individual operation are independent operation of all for the computer.
It is not recognized that it is work that it makes [kappura-men] as a whole.
However, it is only it that keeps moving as taught.
Even if the situation of throwing out the hot water of [yakan] at the time of that is generated
It is not recognized that it is one of the mere operation, and it is a mistake.
The so much, though there seems very severely compared with the other party of man to be no vagueness
To tell the truth, even the procedure for introducing it here is a procedure where vagueness remains.
To begin with, it is a very vague instruction because that draws the line.
Though the screen of the computer thinks gathering [nanoha] wisdom of the point (It is called the dot) to be
When which respect of the one point a point is written is not ordered, it doesn't become it.
If you do a clear instruction perfectly as that
The point can be written as said, and it is necessary to repeat the instruction with the length.DOT 50,50 DOT 51,50 DOT 52,50 DOT 53,50 DOT 54,51 DOT 55,51 DOT 56,51 & nbsp; ･ ･
Among numerical values that devices of the OO turn eyes connected with the computer memorize,It becomes a said unexpected instruction.
Set the 32050th numerical value to 0.
What is the movement of the computer in this manner if it resolves it to the utmost limit?
Memorize one numerical value. (memory)It becomes only ..drinking.. 3.
One numerical value is 0 is judged. (judgment)
Add up two numerical values. (operation)
- Moreover, the addition mentioned here is only four (0+0, 0+1, 1+0, and 1+1).
Various functions are being made by predecessors of the computer now.
Though it is not necessary to think here in detail
Remember the computer is such a strict machine.
It : though the shape was shown a little.
The biggest difference of the programming language and the natural language is in the purpose.
The third is a point that the programming language is a language for the calculation.
All the numerical value on the computer concepts except the numerical value do not exist at all.
Though everything was specified by the numerical value when drawing a triangle in the foregoing paragraph
Similarly, it is all numerical values the treatments in the programming language.
[Jo] and ..drinking.. programming language after all are the languages for the calculation.
However, the calculation that can be done to the computer as explained in the foregoing paragraph is only addition.
Of course, though the addition and subtraction multiplication and division can be done by combining the addition
After all, only the extent and it exists with the calculation made a computer.
Though it seems to be inferior to the calculator such as computers that can do only four rules of arithmetic
The computer provides the function to calculate in order specified by man.
The language to specify the calculation order is a programming language.
The modern computer are neither the order of calculation nor the rut of four rules of arithmetic and combines with the complexity.
Because the function that can be intuitively operated by using the mouse is being offered
The sense of having treated the numerical value weakens by all means.
However, if you strongly consider the numerical value when the programming language is acquired
I think that the grammar etc. not understood easily on the face of things either become comprehensible.