Logo language __logo language with graphic programming

Source: Internet
Author: User

February 6, 2012, Tiobe published the February 2012 list of programming languages. Objective-c last month's rally, the share has already entered the ranks of 7%. And the top of Java and C still occupy the first two nouns. The Python language is accelerating, falling from fourth place last year to eighth place. 51CTO today to introduce you are ranked 18 of the logo language.

Is the logo language used by designers?

If you search the search engine for the word logo, the most out of course is a good sign of the big companies. And who knows what the logo language is. We first have to go back to 1968 years. This year the Soviet invasion Ceskoslovensko, Martin Luther King was assassinated, and logo language was born in this year.

Logo language in English, please refer to: http://www.dmoz.org/Computers/Programming/Languages/Lisp/Logo/

The logo language is a project study funded by the National Science Foundation and completed at the MIT Artificial Intelligence Lab. The logo originated in the Hebrew text, the original intention is thought, is by a psychologist called Pebert in the study of children, found some teaching methods contrary to his ideas, and during a holiday out of a walk, occasionally saw a turtle like a mechanical device triggered inspiration, He finally completed the design of the logo language using his extensive knowledge and intelligence.

Logo language is an early programming language, but also a very close to the natural language programming language, it through the "drawing" way to learn programming, for beginners, especially children to teach teaching methods.

Logo language is for children to play.

The structure of the logo language can be illustrated by the following code examples. For example, we want to complete the x: = y + 3 Such functions, logo code is as follows:

Make ' x sum:y 3 make ' x sum:y ' 3

This code must still be easy to understand, it also shows that the logo language is an early language, as COBOL is more understandable.

Circular statements in the logo language

REPEAT 4 [FD left 90]

Basic logo Syntax Implementation principle:

1. Movement-related directives: "Forward", "back" and "return". The advance command allows the turtle to move forward in a certain number of units, for example: after the "Forward (forward) 50" command, the Turtle moves forward 50 units; The back command allows the turtle to move backwards, and if you perform a "Back 50" command, the turtle's direction will not change, It will go back to 50 units; After the return command, regardless of the current position and direction of the turtle, it will obediently return to the center of the plot area and toward the top of the screen.

2. Instructions related to turning: "Turn right" and "turn left". The right Turn command allows the turtle to turn to the right for a certain angle as required, for example, to perform the right 45 command, the turtle's orientation rotates to a 45-degree angle to the right, while a left-turn command allows the turtle to turn left, as in the case of the "left 45" command, the small turtle's orientation will rotate to a 45-degree angle. These commands can drive a small turtle around its center to rotate a certain angle.

3. Control-related commands are repeat (duplicates), IF ... THEN ... ELSE ... (conditional execution) and so on. If the implementation of repeat 4[forward Rlght 9O] can draw the square in Figure 2, if the direct combination of Move command and turn command, then write more statements, but are some repeated use of 4 times "FORWARD 100" and "right 90" command.

Then we can use the syntax above to implement a drawing function, first look at the following code:

to Spiral:size if:size > [stop]; An exit condition Fd:size RT 15; Many lines of action spiral:size *1.02; The tailend recursive call end Spiral 10

After the code is executed in the logo, the following graph will be drawn.

What the. This graphic is too ugly. 51CTO's editor admits it's really hard to look at, and it's not as good as the most popular HTML 5 graphics. But this piece of code is too simple, 7 lines of code to write is also a good practice.

The language of logo is the best language for children to learn computer programming, because it is a programming language for children, which can make children develop in cognition and skill. Logo language has a strong pertinence, because for children, "painting" than "word processing" more dynamic, give full play to their imagination to create, and word processing is rather boring, not suitable for children. Logo is mainly used for "drawing" production, and the use of "turtle mapping" way, suitable for children's characteristics, can fully arouse their interest and learning the language of enthusiasm, to achieve the purpose of entertaining. In the logo language, it is not the same as the drawing software now used, the main difference is that the basic method of drawing the logo language can not use the coordinates, but through the forward, backward, turn left, turn right, home and other children easy to understand language and command, which is very suitable for children's knowledge level, Make it easier for children who have not yet touched the coordinates. When drawing with the logo language, learners need to understand some common geometrical features and understand the concepts of distance, angle and degree.

To try the logo language, please download: http://www.onlinedown.net/soft/50555.htm

Here are the other ranking data and trends for the current programming language rankings.

Top 10 programming language trend charts

20 to 50 languages ranked

Here is the 50th to 100th programming language ranking

(Visual) FoxPro, ABC, Algol, Alice, Awk, Bash, BC, BETA, BlitzMax, Boo, Bourne Shell, C++/cli, CL (os/400), clean, Clojure, CT, Dar T, Dylan, Eiffel, Euphoria, Factor, Icon, Inform, Io, J, JScript.NET, Korn Shell, LabVIEW, LABWINDOWS/CVI, Ladder Logic, L Ingo, Max/msp, Modula-2, Mumps, NATURAL, Oberon, Occam, OpenCL, Oz, PILOT, PowerShell, Revolution, REXX, S, S-plus, SAS, S Cala, VBScript, VHDL, Z Shell

The following is an annual trend for programming language categories

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.