Karel (programming language): Difference between revisions

Content deleted Content added
Tag: Reverted
Bender the Bot (talk | contribs)
m External links: HTTP to HTTPS for SourceForge
 
(5 intermediate revisions by 5 users not shown)
Line 3:
|name = Karel the Robot
|logo =
|screenshot = [[File:NikiExample.jpg|220px]]
|screenshot size = 250px
|paradigm = [[procedural programming|procedural]]
|year = 1981
Line 20 ⟶ 21:
 
==Principles==
A [[computer program|program]] in Karel is used to control a simple [[robot]] named selami Karel that lives in an environment consisting of a grid of streets (left-right) and avenues (up-down). Karel understands five basic instructions: <code>move</code> (Karel moves by one square in the direction he is facing), <code>turnLeft</code> (Karel turns 90&nbsp;° left), <code>putBeeper</code> (Karel puts a beeper on the square he is standing at), <code>pickBeeper</code> (Karel lifts a beeper off the square he is standing at), and <code>turnoff</code> (Karel switches himself off, the program ends). Karel can also perform [[boolean data type|boolean]] queries about his immediate environment, asking whether there is a beeper where he is standing, whether there are barriers next to him, and about the direction he is facing. A [[programmer]] can create additional [[instruction (computer science)|instruction]]s by defining them in terms of the five basic instructions, and by using conditional [[control flow]] statements <code>if</code> and <code>while</code> with environment queries, and by using the <code>iterate</code> construct.{{Citation needed|date=April 2020}}
 
===Example===
Line 116 ⟶ 117:
* [http://xkarel.sourceforge.net xKarel] by R. Dostal and P. Abrahamczik (created 1997)
* [http://karel.sourceforge.net Karel] by T. Mitchell (created 2000)
* [http://primepuzzle.com/karel/ Karel in tiny-c] {{Webarchive|url=https://web.archive.org/web/20191128164514/http://primepuzzle.com/karel/ |date=2019-11-28 }} by Lee Bradley (created 2013)
* [http://karel.cloudmakers.eu Karel for iPad] by CloudMakers (created 2014)
* [http://www.codehs.com Karel in JavaScript] by CodeHS
* [https://metacpan.org/pod/Karel Karel in Perl 5] by E. Choroba (created 2016)
* [https://sourceforge.net/projects/karel-3d/ Karel-3D in JavaScript and C++ (sk) (en) (de) (es)] (created 2017, 2018)
* [httphttps://gvr.sourceforge.net/ Guido van Robot (GvR) - Karel in Python] (created 2006, 2010)
 
{{Authority control}}