Logo (programming language)

Logo was developed by Seymour Papert education -oriented functional programming language from the 1960s. As an interpreted language was Logo to learn as easily, but had a time for the home computer, as this language was the most widely used, very high efficiency, thanks to the dynamic lists from Lisp, user-defined and recursively callable functions and some other elements. Nevertheless, the programming could not like to impose on others first " beginner programming languages ​​" such as BASIC, whatever it was, that it was appropriate for children developed and therefore underestimated by many.

For that time very advanced items such as a dynamic data type recognition ensured also for speed disadvantages. In addition, the philosophy of language contradicted the then-emerging concept of structured programming. Loops are usually only about recursion or lists embedded program parts realized. Recursion was often regarded as difficult to read and requires a lot of memory and computation time. A data embedded in and thus at runtime variable code was considered a recipe for unpredictable program properties and in multi-user environments (and therefore also in networks) as a security problem.

In modern programming languages ​​such as Logo Writer or Lingo, for example, the possibilities of this programming find, however, again - partly in the form of objects.

Turtle Graphics

Her best-known feature is turtle graphics, in which one or more virtual turtles can move across the screen, which shall go, if necessary, a colored line behind him. These lines can then be created a drawing.

Turtle Graphics is ideal for two-dimensional geometrical drawings and fractal curves of the type of dragon curve or the Hilbert curve.

The Koch Snowflake

A more complex example with circularly arranged squares

The first image is, for example - but without the color - produced by the following program:

To n_eck: ne: sz; Defines a new function n_eck with two parameters      repeat: ne [; Repeats the following code block: ne times          rt 360 /: ne; Rotates the Turtle by an angle of 360 ° /: ne to the right          fd: sz; Moves the turtle to sz forward and draws a line here      ] end to mn_eck: ne: sz; Defines a new function mn_eck with two parameters      repeat: ne [; Repeats the following code block: ne times          rt 360 /: ne; Rotates the Turtle by an angle of 360 ° /: ne degree          n_eck: ne: sz; Performs n_eck and painted as the defined above n_eck      ] end mn_eck 36 20; Performs mn_eck and painted as the defined above mn_eck By calling n_eck with a large parameter: ne gives the impression of a circle. mn_eck rotates the Turtle often a little, and then draws a circle, giving the impression of a large circle is formed, which in turn contains a small circles.

Logo and Lisp

The syntax of Logo is based on the Lisp, a 1958 MIT incurred, list-based programming language family. Typical of Lisp is the bracketing of all expressions. This was omitted in logo. In a direct comparison on the basis of a program to calculate the factorial of the similarity of the two languages ​​is visible:

In Logo operators are used in infix notation, as well as return values ​​must be set explicitly with output. If one uses the available in Logo Contest by prefix notation (n * m corresponds, for example PRODUCT nm) and the optional bracketing, the two codes are even more similar.

Extended Command Set in MSWLogo

In addition to the standard command set MSWLogo offer newer versions of extended commands to generate three-dimensional representations.

527600
de