# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Translate Toolkit 1.11.0\n" #. type: Title-text #: ../scene.txt:1 #, no-wrap msgid "Spiral" msgstr "Spirale" #. type: Resume-text #: ../scene.txt:2 #, no-wrap msgid "Create a procedure in order to teach your bot to perform a spiral." msgstr "Definieren Sie eine Funktion, um dem Roboter das Spiralen leichter zu machen." #. type: ScriptName-text #: ../scene.txt:3 #, no-wrap msgid "Move" msgstr "Funktion2" #. type: \b; header #: ../help/help.E.txt:1 #, no-wrap msgid "Exercise" msgstr "Übung" #. type: Plain text #: ../help/help.E.txt:2 #, no-wrap msgid "Follow the way in form of a spiral. The bot must move 2 times 25m forward and turn, then move 2 times 20m forward and turn, and so on." msgstr "Folgen Sie dem spiralförmigen Weg. Der Roboter muss sich 2 mal um 25m nach vorn bewegen und sich anschließend drehen, dann 2 mal 20m vorwärts und drehen, usw." #. type: Image filename #: ../help/help.E.txt:3 #, no-wrap msgid "tproc2" msgstr "tproc2" #. type: \b; header #: ../help/help.E.txt:4 #, no-wrap msgid "Function" msgstr "Die Funktion" #. type: Plain text #: ../help/help.E.txt:5 #, no-wrap msgid "You will have noticed that the way is made of \"L\"-shaped parts that are fit one into another. The first one (dark blue) measures two times 25 meters. The second one (light blue) measures 5 meters less. Let us start with writing the function that will move the bot on a \"L\"-shaped part whose length will be given as a parameter:" msgstr "Sie werden bemerkt haben, dass der Weg aus L-förmigen Teilen besteht, die ineinander passen. Das erste (dunkelblau) misst zwei mal 25 Meter. Das zweite (hellblau) misst 5 Meter weniger. Fangen wir damit an, die Funktion zu schreiben, die den Roboter auf einem L-förmigen Teil entlang bewegt, dessen Länge als Parameter übergeben wird:" #. type: Source code #: ../help/help.E.txt:7 #, no-wrap msgid "" "void object::Part(float length)\n" "{\n" "\tfor ( int i=0 ; i<2 ; i=i+1 )\n" "\t{\n" "\t\tmove(length);\n" "\t\tturn(90);\n" "\t}\n" "}" msgstr "" "void object::Part(float length)\n" "{\n" "\tfor ( int i=0 ; i<2 ; i=i+1 )\n" "\t{\n" "\t\tmove(length);\n" "\t\tturn(90);\n" "\t}\n" "}" #. type: Plain text #: ../help/help.E.txt:16 #, no-wrap msgid "Now you just need to write the main function, that will call the function Part. At the beginning the variable rest will be set to 25m. The while loop will then repeat the instructions inside the block as long as rest is greater than zero. Inside the loop, first call the function Part (see above), then subtract 5m to the length of the L." msgstr "Nun müssen Sie nur noch die Hauptfunktion schreiben, welche einfach die Funktion Part aufruft. Zu Beginn setzen wir die Variable rest auf 25m. Die while-Schleife wiederholt die Anweisungen innerhalb des Blockes, solange rest größer als Null ist. Innerhalb der Schleife wird zunächst die Funktion Part (siehe oben), aufgerufen und von rest werden 5m subtrahiert." #. type: Source code #: ../help/help.E.txt:18 #, no-wrap msgid "" "extern void object::Function2( )\n" "{\n" "\tfloat\trest = 25;\n" "\twhile ( rest > 0 )\n" "\t{\n" "\t\tPart(rest);\n" "\t\trest = rest-5;\n" "\t}\n" "}" msgstr "" "extern void object::Function2( )\n" "{\n" "\tfloat\trest = 25;\n" "\twhile ( rest > 0 )\n" "\t{\n" "\t\tPart(rest);\n" "\t\trest = rest-5;\n" "\t}\n" "}" #. type: Plain text #: ../help/help.E.txt:28 #, no-wrap msgid "The function Part will be called a last time with the value 5. Then the expression rest-5 will set the value of the variable rest to zero, and the while loop will stop." msgstr "Die Funktion Part wird zuletzt mit dem Wert 5 aufgerufen. Danach setzt der Ausdruck rest-5 den Wert der Variablen rest auf Null, und die while-Schleife wird beendet." #. type: \b; header #: ../help/help.E.txt:30 #, no-wrap msgid "Remark" msgstr "Hinweis" #. type: Plain text #: ../help/help.E.txt:31 #, no-wrap msgid "You will have noticed that in the previous exercise, the main function was at the beginning of the program, whereas in this exercise, it is at the end of the program, after the function Part. The rank order of the functions in the program does not matter, you can write a program either way." msgstr "Sie werden bemerkt haben, dass in der vorhergehenden Übung die Hauptfunktion ganz am Anfang des Programmes stand, wogegen sie sich in diesem Beispiel am Ende befindet; hinter der Funktion Part. Die Reihenfolge der Funktionen im Programm ist gleichgültig. Sie können ein Programm anordnen, wie Sie wollen." #. type: \t; header #: ../help/help.E.txt:33 #, no-wrap msgid "See also" msgstr "Siehe auch" #. type: Plain text #: ../help/help.E.txt:34 #, no-wrap msgid "Programming, types and categories." msgstr "Die CBOT-Sprache, die Variablentypen und die Kategorien."