Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
3 user(s) are online (3 user(s) are browsing encyclopedia)

Members: 0
Guests: 3

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Karel programming language

Karel is an .

= Principles =

A program in Karel is used to control a simple robot (named Karel, of course) that lives in a city consisting of a rectangular grid of streets (left-right) and avenues (up-down). Karel understands five basic instructions: move (Karel moves by one square in the direction he is facing), turnleft (Karel turns 90 ° left), putbeeper (Karel puts a beeper on the square he is standing at), pickbeeper (Karel lifts a beeper off the square he is standing at), and turnoff (Karel switches himself off, the program ends). A programmer can create additional instructions by definining them in terms of those five basic, and using control flow statements if, while, iterate.

== Example ==

As an example of Karel syntax, look at the following simple example: BEGINNING-OF-PROGRAM   DEFINE turnright AS BEGIN turnleft turnleft turnleft END   BEGINNING-OF-EXECUTION ITERATE 3 TIMES turnright   turnoff END-OF-EXECUTION   END-OF-PROGRAM

= Variants and descendants =

The language has inspired the development of various clones and similar educational languages. As the language is intended for beginners and children, localized variants exist in some languages, notably Czech language (the programming language was quite popular in Czechoslovakia). The Slovak language version, called Robot Karol, contains further enhancements and it has been itself translated to English and Czech.

The principles of Karel were updated to the object-oriented programming paradigm in a new programming language called Karel++. Karel++ is conceptually based on Karel, but uses a completely new syntax, similar to Java programming language.

= Reference =

  • Richard E. Pattis. Karel The Robot: A Gentle Introduction to the Art of Programming . John Wiley & Sons, 1981. ISBN 0471597252.
  • Joseph Bergin, Mark Stehlik, Jim Roberts, Richard E. Pattis. Karel++: A Gentle Introduction to the Art of Object-Oriented Programming . John Wiley & Sons, 1996. ISBN 0471138096.
  • = External links =

  • [http://mormegil.wz.cz/prog/karel/prog_doc.htm Karel syntax]
  • [http://csis.pace.edu/~bergin/karel.html Karel++]
  • [http://xkarel.sourceforge.net/ xKarel]
  • [http://www.robotkarol.sk/ Robot Karol++]