/usr/share/doc/racket/deinprogramm/turtle.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>8 Turtle-Grafik: "turtle.ss"</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Sprachebenen und Material zu <span style="font-style: italic">Die Macht der Abstraktion</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="DMdA-beginner.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion -<wbr></wbr> Anfänger</a></td></tr><tr><td align="right">2 </td><td><a href="DMdA-vanilla.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion</a></td></tr><tr><td align="right">3 </td><td><a href="DMdA-assignments.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion mit Zuweisungen</a></td></tr><tr><td align="right">4 </td><td><a href="DMdA-advanced.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion fortgeschritten</a></td></tr><tr><td align="right">5 </td><td><a href="Konstruktionsanleitungen_1_bis_10.html" class="tocviewlink" data-pltdoc="x">Konstruktionsanleitungen 1 bis 10</a></td></tr><tr><td align="right">6 </td><td><a href="image.html" class="tocviewlink" data-pltdoc="x">Bilder konstruieren:<span class="mywbr"> </span> <span class="stt">"image.ss"</span><a name="(idx._(gentag._2._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">7 </td><td><a href="world.html" class="tocviewlink" data-pltdoc="x">Animationen:<span class="mywbr"> </span> <span class="stt">"world.ss"</span><a name="(idx._(gentag._3._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">8 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Turtle-<wbr></wbr>Grafik:<span class="mywbr"> </span> <span class="stt">"turtle.ss"</span><a name="(idx._(gentag._4._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">9 </td><td><a href="sound.html" class="tocviewlink" data-pltdoc="x">Abspielen von Audio-<wbr></wbr>Dateien:<span class="mywbr"> </span> <span class="stt">"sound.ss"</span><a name="(idx._(gentag._5._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">10 </td><td><a href="line3d.html" class="tocviewlink" data-pltdoc="x">3D-<wbr></wbr>Liniengraphik:<span class="mywbr"> </span> <span class="stt">"line3d.ss"</span><a name="(idx._(gentag._6._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">11 </td><td><a href="DMdA__Sprachen_als_Libraries.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">DMd<span class="mywbr"> </span>A</span>:<span class="mywbr"> </span> Sprachen als Libraries</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>8 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Turtle-<wbr></wbr>Grafik:<span class="mywbr"> </span> <span class="stt">"turtle.ss"</span><a name="(idx._(gentag._4._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">8.1 </td><td><a href="#%28part._.Tutorial%29" class="tocviewlink" data-pltdoc="x">Tutorial</a></td></tr><tr><td align="right">8.2 </td><td><a href="#%28part._.Prozeduren%29" class="tocviewlink" data-pltdoc="x">Prozeduren</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">8.1<tt> </tt></span><a href="#%28part._.Tutorial%29" class="tocsubseclink" data-pltdoc="x">Tutorial</a></td></tr><tr><td><span class="tocsublinknumber">8.1.1<tt> </tt></span><a href="#%28part._.Verbesserungen%29" class="tocsubseclink" data-pltdoc="x">Verbesserungen</a></td></tr><tr><td><span class="tocsublinknumber">8.2<tt> </tt></span><a href="#%28part._.Prozeduren%29" class="tocsubseclink" data-pltdoc="x">Prozeduren</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">turtle</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._set-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">turn</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">draw</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._move%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">move</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._run%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">run</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sequence</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="world.html" title="backward to "7 Animationen: "world.ss""" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Sprachebenen und Material zu Die Macht der Abstraktion"" data-pltdoc="x">up</a> <a href="sound.html" title="forward to "9 Abspielen von Audio-Dateien: "sound.ss""" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-part-tag=""turtle"">8<tt> </tt><a name="(part._turtle)"></a>Turtle-Grafik: <span class="stt">"turtle.ss"</span><a name="(idx._(gentag._4._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></h3><p>Note: This is documentation for the <span class="stt">"turtle.rkt"</span> teachpack that goes
with the German textbook
<span style="font-style: italic"><a href="http://www.deinprogramm.de/dmda/">Die Macht der
Abstraktion</a></span>.</p><p>Turtle-Grafik ist eine Methode zum Erstellen von Computergrafiken. Das
Zeichnen wird dabei durch das Bewegen einer virtuellen Schildkröte
über den Zeichenbereich modelliert. Eine Schildkröte kann durch drei
Befehle bewegt werden:</p><ul><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._move%29%29" class="RktValLink" data-pltdoc="x">move</a></span><span class="stt"> </span><span class="RktSym">n</span><span class="RktPn">)</span> Bewegt die Schildkröte um <span class="RktSym">n</span> Pixel ohne zu zeichnen.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="stt"> </span><span class="RktSym">n</span><span class="RktPn">)</span> Bewegt die Schildkröte um <span class="RktSym">n</span> Pixel und zeichnet dabei.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="stt"> </span><span class="RktSym">n</span><span class="RktPn">)</span> Dreht die Schildkröte um n Grad im Uhrzeigersinn.</p></li></ul><p>Wir stellen jetzt ein Teachpack für DrRacket vor, mit dessen Hilfe
solche Turtle-Grafiken erstellt werden können.</p><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-part-tag=""Tutorial"">8.1<tt> </tt><a name="(part._.Tutorial)"></a>Tutorial</h4><p>Unser Ziel ist es, in diesem Tutorial ein Quadrat mithilfe der
Prozeduren des Teachpacks zu zeichnen. Aus diesem Grund müssen wir
zunächst mit der Prozedur <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span> eine Linie nach rechts malen. Die
initiale Ausgansposition der Turtle ist in der Bildmitte mit Blick
nach rechts. Mit <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="stt"> </span><span class="RktVal">20</span><span class="RktPn">)</span> bewegen wir die Turtle dann 20 Pixel nach
rechts und zeichnen dabei. Um das resultierende Bild zu sehen ist,
müssen wir die Turtle mittels der Prozedur run laufen lassen. Die
restlichen Parameter für run sind die Höhe und die Breite des Bildes
sowie die Farbe, in der gezeichnet werden soll. Geben Sie also
folgenden Befehl in die REPL ein, um Ihre erste Turtle-Grafik zu
erstellen:</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._run%29%29" class="RktValLink" data-pltdoc="x">run</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="hspace"> </span><span class="RktVal">20</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">100</span><span class="hspace"> </span><span class="RktVal">100</span><span class="hspace"> </span><span class="RktVal">"red"</span><span class="RktPn">)</span></p></blockquote><p>Sie erhalten dann eine Ausgabe wie die folgende:</p><p><img src="p1.jpg" alt=""/></p><p>Nun vervollständigen wir die Linie zu einem rechten Winkel: wir drehen
die Turtle um 90° nach rechts und zeichnen dann eine Line der Länge 20
Pixel nach unten. Zum Drehen einer Turtle verwenden wir die Prozedur
<span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span>.</p><p>Da wir ein Quadrat aus zwei rechten Winkeln zusammensetzen können,
abstrahieren wir über das Zeichnen des rechten Winkels. Dazu schreiben
wir eine Prozedur <span class="RktSym">right-angle</span> die als Parameter eine Turtle
erhält:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">:</span><span class="hspace"> </span><span class="RktSym">right-angle</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">right-angle</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%252A%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let*</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">t2</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="hspace"> </span><span class="RktVal">20</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">t1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t3</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">t2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t4</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="hspace"> </span><span class="RktVal">20</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">t3</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">t4</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Das Ergebnis sieht dann so aus:</p><p><img src="p2.jpg" alt=""/></p><p>Um das Quadrat komplett zu zeichnen, sollen nun zwei rechte Winkel
verwendet werden. Wir zeichnen also einen rechten Winkel, drehen uns
um 90° nach rechts, und zeichnen einen zweiten rechten Winkel.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">:</span><span class="hspace"> </span><span class="RktSym">square</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">square</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%252A%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let*</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">t2</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">right-angle</span><span class="hspace"> </span><span class="RktSym">t1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t3</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">t2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">t4</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">right-angle</span><span class="hspace"> </span><span class="RktSym">t3</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">t4</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>So sieht das Ergebnis aus:</p><p><img src="p3.jpg" alt=""/></p><h5 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-part-tag=""Verbesserungen"">8.1.1<tt> </tt><a name="(part._.Verbesserungen)"></a>Verbesserungen</h5><p>An dem Beispiel ist leicht zu sehen, dass es zum Zeichnen mit Hilfe
von Turtle-Grafik oft erforderlich ist, Zwischenwerte wie <span class="RktSym">t1</span>,
<span class="RktSym">t2</span> etc., an die nächste Prozedur weiterzureichen, die Werte
ansonsten aber nicht weiterverwendet werden. Beispielsweise werden in
der obigen Definition von square die Variablen <span class="RktSym">t1</span>, ...,
<span class="RktSym">t4</span> nur gebraucht, um die Prozeduren <span class="RktSym">right-angle</span>,
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="stt"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span> und <span class="RktSym">right-angle</span> hintereinander
auszuführen.</p><p>Um solche Fälle einfach programmieren zu können, enthält das
Turtle-Teachpack die Prozedur <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="RktValLink" data-pltdoc="x">sequence</a></span>. Damit können wir eine
zu <span class="RktSym">right-angle</span> äquivalente Version wesentlicher einfacher
aufschreiben:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">right-angle2</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="RktValLink" data-pltdoc="x">sequence</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="hspace"> </span><span class="RktVal">20</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValLink" data-pltdoc="x">draw</a></span><span class="hspace"> </span><span class="RktVal">20</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Ebenso wie <span class="RktSym">right-angle</span> können wir square leichter schreiben als:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">square2</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="RktValLink" data-pltdoc="x">sequence</a></span><span class="hspace"> </span><span class="RktSym">right-angle</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">right-angle</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-part-tag=""Prozeduren"">8.2<tt> </tt><a name="(part._.Prozeduren)"></a>Prozeduren</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._turtle))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValDef RktValLink" data-pltdoc="x">turtle</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">signature</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Dies ist die Signatur für Turtles.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._set-color))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._set-color%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-color</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">color</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> Diese Prozedur ist
eine Prozedurfabrik. Sie liefert als Ergebnis eine Prozedur, die auf
eine Turtle anwendbar ist. Wendet man das Ergebnis auf eine Turtle an,
so ändert dies die Farbe mit der gezeichnet wird.</div></p><p>Folgender Code</p><p><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">square3</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="RktValLink" data-pltdoc="x">sequence</a></span><span class="hspace"> </span><span class="RktSym">right-angle</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValLink" data-pltdoc="x">turn</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-9</span>0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._set-color%29%29" class="RktValLink" data-pltdoc="x">set-color</a></span><span class="hspace"> </span><span class="RktVal">"blue"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">right-angle</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">liefert dieses Bild:</div></p><p><img src="p4.jpg" alt=""/></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._turn))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turn%29%29" class="RktValDef RktValLink" data-pltdoc="x">turn</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> Diese Prozedur ist
eine Prozedurfabrik. Sie liefert als Ergebnis eine Prozedur, die auf
eine Turtle anwendbar ist. Wendet man das Ergebnis auf eine Turtle an,
so ändert sich die Blickrichtung der Turtle um die gegebene Gradzahl
gegen den Uhrzeigersinn.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._draw))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._draw%29%29" class="RktValDef RktValLink" data-pltdoc="x">draw</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> Diese Prozedur ist
eine Prozedurfabrik. Sie liefert als Ergebnis eine Prozedur, die auf
eine Turtle anwendbar ist. Wendet man das Ergebnis auf eine Turtle an,
so bewegt sich die Schildkröte um die gegebene Anzahl von Pixel und
zeichnet dabei eine Linie.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._move))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._move%29%29" class="RktValDef RktValLink" data-pltdoc="x">move</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> Diese Prozedur ist eine
Prozedurfabrik. Sie liefert als Ergebnis eine Prozedur, die auf ein
Turtle anwendbar ist. Wendet man das Ergebnis auf eine Turtle an, so
bewegt sich die Schildkröte um die gegebene Anzahl von Pixel, zeichnet
dabei aber keine Linie.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._run))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._run%29%29" class="RktValDef RktValLink" data-pltdoc="x">run</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">color</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="image.html#%28def._%28%28lib._deinprogramm%2Fimage..rkt%29._image%29%29" class="RktValLink" data-pltdoc="x">image</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Diese Prozedur wendet die übergebene Prozedur von Turtle nach Turtle
auf die initiale Schildkröte an und zeigt das daraus resultierende
Bild an. Der zweite Parameter ist die Höhe des Bilds, der dritte
Parameter die Breite des Bilds und der vierte Parameter die Farbe, mit
der gezeichnet wird.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/turtle..rkt)._sequence))"></a><span title="Provided from: teachpack/deinprogramm/turtle | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._sequence%29%29" class="RktValDef RktValLink" data-pltdoc="x">sequence</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Diese Prozedur nimmt eine beliebige Anzahl von Turtle-Veränderungen
(d.h. Prozeduren mit Signatur <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fturtle..rkt%29._turtle%29%29" class="RktValLink" data-pltdoc="x">turtle</a></span>) und erstellt
eine neue Prozedur, die die Veränderungen der Reihe nach von links
nach rechts abarbeitet.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="world.html" title="backward to "7 Animationen: "world.ss""" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Sprachebenen und Material zu Die Macht der Abstraktion"" data-pltdoc="x">up</a> <a href="sound.html" title="forward to "9 Abspielen von Audio-Dateien: "sound.ss""" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|