8761 lines
309 KiB
Plaintext
8761 lines
309 KiB
Plaintext
# SOME DESCRIPTIVE TITLE
|
|
# Copyright (C) YEAR Free Software Foundation, Inc.
|
|
# This file is distributed under the same license as the PACKAGE package.
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
|
|
"Language-Team: LANGUAGE <LL@li.org>\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: \b; header
|
|
#: ../E/abstime.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>abstime</code>"
|
|
msgstr "Anweisung <code>abstime</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/abstime.txt:2 ../E/deletef.txt:6 ../E/delinfo.txt:2 ../E/errmode.txt:5 ../E/flatgrnd.txt:2 ../E/readln.txt:8 ../E/send.txt:2 ../E/strfind.txt:4 ../E/strleft.txt:4 ../E/strlen.txt:4 ../E/strlower.txt:4 ../E/strmid.txt:4 ../E/strright.txt:4 ../E/strupper.txt:4 ../E/strval.txt:8 ../E/testinfo.txt:2 ../E/writeln.txt:8
|
|
#, no-wrap
|
|
msgid "Syntax:"
|
|
msgstr "Syntax:"
|
|
|
|
#. type: Source code
|
|
#: ../E/abstime.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>abstime ( );<n/>"
|
|
msgstr "<c/>abstime ( );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/abstime.txt:5
|
|
#, no-wrap
|
|
msgid "Return the time in seconds elapsed since the beginning of the mission."
|
|
msgstr "Ergibt die Zeit in Sekunden, die seit dem Beginn der Mission vergangen ist."
|
|
|
|
#. type: \t; header
|
|
#: ../E/abstime.txt:7
|
|
#, no-wrap
|
|
msgid "Return: <code><a cbot|float>float</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/abstime.txt:8
|
|
#, no-wrap
|
|
msgid "Time in seconds."
|
|
msgstr "Zeit in Sekunden."
|
|
|
|
#. type: \t; header
|
|
#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:114 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:165 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
|
|
#, no-wrap
|
|
msgid "See also"
|
|
msgstr "Siehe auch"
|
|
|
|
#. type: Plain text
|
|
#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:166 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
|
|
#, no-wrap
|
|
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr "Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/aim.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>aim</code>"
|
|
msgstr "Anweisung <code>aim</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/break.txt:2 ../E/continue.txt:2 ../E/direct.txt:2 ../E/motor.txt:15 ../E/while.txt:20
|
|
#, no-wrap
|
|
msgid "Syntax :"
|
|
msgstr "Syntax:"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/aim.txt:6 ../E/fire.txt:14
|
|
#, no-wrap
|
|
msgid "<a object|botfr>Shooter</a>"
|
|
msgstr "<a object|botfr>Shooter</a>"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/aim.txt:7 ../E/fire.txt:15
|
|
#, no-wrap
|
|
msgid "<a object|botor>Orga shooter</a>"
|
|
msgstr "<a object|botor>Orgashooter</a>"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/aim.txt:8 ../E/fire.txt:16
|
|
#, no-wrap
|
|
msgid "<a object|botphaz>Phazer shooter</a>"
|
|
msgstr "<a object|botphaz>Phazershooter</a>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:18
|
|
#, no-wrap
|
|
msgid "When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction <code><a cbot|turn>turn</a></code>."
|
|
msgstr "Wenn der Roboter mit einem Programm gesteuert wird, muss der ganze Roboter gedreht werden, um nach links oder rechts zu schiessen. Benutzen Sie dazu den Befehl <code><a cbot|turn>turn</a></code>."
|
|
|
|
#. type: \t; header
|
|
#: ../E/cos.txt:5 ../E/sin.txt:5 ../E/tan.txt:5 ../E/turn.txt:24
|
|
#, no-wrap
|
|
msgid "angle: <code><a cbot|float>float</a></code>"
|
|
msgstr "winkel: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/aim.txt:13
|
|
#, no-wrap
|
|
msgid "Angle in degrees of the gun relative to the robot. A positive value orients the gun upward. For shooters and orga shooters, the angle must range from <code>-20</code> to <code>+20</code> degrees. For phazer shooters, the angle must range from <code>-20</code> to <code>45</code> degrees."
|
|
msgstr "Gewünschter Winkel der Kanone in Grad relativ zum Roboter. Ein positiver Winkel dreht die Kanone nach oben. Für <a object|botfr>Shooter</a> und <a object|botor>Orgashooter</a> muss der Winkel zwischen <code>-20</code> und <code>+10</code> Grad liegen. Für einen <a object|botphaz>Phazershooter</a> liegt der Bereich zwischen <code>-20</code> und <code>+45</code> Grad."
|
|
|
|
#. type: \t; header
|
|
#: ../E/aim.txt:18 ../E/build.txt:22 ../E/destroy.txt:10 ../E/drop.txt:23 ../E/factory.txt:16 ../E/fire.txt:25 ../E/goto.txt:29 ../E/grab.txt:23 ../E/move.txt:16 ../E/pencolor.txt:9 ../E/pendown.txt:12 ../E/penup.txt:6 ../E/penwidth.txt:9 ../E/recycle.txt:7 ../E/research.txt:13 ../E/sniff.txt:11 ../E/takeoff.txt:10 ../E/thump.txt:7 ../E/turn.txt:27
|
|
#, no-wrap
|
|
msgid "Return value: <code><a cbot|int>int</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/aim.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if everything is OK, a value different from zero if the rotation could not be performed: \n"
|
|
"<code>== 0 </code>The gun has now got the desired orientation\n"
|
|
"<code>!= 0 </code>rotation impossible"
|
|
msgstr ""
|
|
"Null wenn alles i.O., ein Wert verschieden von Null wenn die Ausrichtung nicht ausgeführt werden konnte: \n"
|
|
"<code>== 0 </code>Die Kanone hat jetzt die gewünschte Ausrichtung\n"
|
|
"<code>!= 0 </code>Ausrichtung unmöglich"
|
|
|
|
#. type: \b; header
|
|
#: ../E/array.txt:1
|
|
#, no-wrap
|
|
msgid "Arrays"
|
|
msgstr "Arrays"
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:2
|
|
#, no-wrap
|
|
msgid "An array is basically a collection of variables of the same type or class. You can use N dimensionnal arrays in the CBOT language. Each dimension is limited to 9999 elements. You must use square brackets <code>[]</code> after the type name or the variable name to declare an array."
|
|
msgstr "Ein Array (auch Feld genannt) ist eine nummerierte Ansammlung von Variablen vom gleichen Typ oder von der gleichen Klasse. In CBOT können Sie n-dimensionale Arrays benutzen. Jede Dimension ist auf 9999 Elemente beschränkt. Benutzen Sie eckige Klammern <code>[]</code> nach dem Typ oder dem Variablennamen für die Deklaration eines Arrays."
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:9
|
|
#, no-wrap
|
|
msgid "Actually when the CBOT interpreter encounters an array declaration, it just creates a <code><a cbot|null>null</a></code> <a cbot|pointer>reference</a>:"
|
|
msgstr "Wenn der CBOT-Interpreter eine Array-Deklaration antrifft, wird die Variable als ein <code><a cbot|null>Null</a></code>-<a cbot|pointer>Zeiger</a> initialisiert:"
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:11
|
|
#, no-wrap
|
|
msgid "int a[5]; // a is now a null reference"
|
|
msgstr "int a[5]; // a enthält einen Null-Zeiger"
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:13
|
|
#, no-wrap
|
|
msgid "As soon as you put values into the array, the elements are created and the reference is initialized:"
|
|
msgstr "Sobald Sie einer Variable des Arrays einen Wert zuweisen, werden die Elemente erstellt, und die Variable zeigt auf diese Elemente:"
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"a[2] = 213; // a points to\n"
|
|
" // 3 elements [0], [1] et [2]"
|
|
msgstr ""
|
|
"a[2] = 213; // a zeigt auf die\n"
|
|
" // 3 Elemente [0], [1] und [2]"
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:18
|
|
#, no-wrap
|
|
msgid "After this operation, <code>a</code> contains a reference to the elements of the array. Elements <code>[0]</code> and <code>[1]</code> are created but not initialized because an array cannot contain empty elements. The <code><a cbot|sizeof>sizeof</a></code> instruction allows you to obtain the number of elements contained in an array."
|
|
msgstr "Nach dieser Zuweisung zeigt <code>a</code> auf die Elemente des Arrays. Die Elemente <code>[0]</code> und <code>[1]</code> wurden erstellt, aber noch nicht definiert: Ihnen wurde noch kein Wert zugewiesen. Mit dem Befehl <code><a cbot|sizeof>sizeof</a></code> können Sie die Anzahl Elemente in einem Array abfragen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:20
|
|
#, no-wrap
|
|
msgid "When an array is declared with a maximum size, the program will stop as soon as there is an access beyond the maximum array size. No error is signalled during compilation even if the error is obvious:"
|
|
msgstr "Wenn ein Array mit einer Maximalgröße deklariert wird, hält das Programm mit einer Fehlermeldung an, sobald die Maximalgröße überschritten wird. Dies geschieht jedoch erst bei der Ausführung, bei der Komplilation werden solche Fehler nicht erkannt, auch wenn sie \"offensichtlich\" sind:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:28
|
|
#, no-wrap
|
|
msgid "If you pass an array as parameter to a <a cbot|function>function</a>, the function only receives a <a cbot|pointer>reference</a> to the array. That means if you modify an array element in the function, the element of the array that has been passed the function will be actuallay modified."
|
|
msgstr "Wenn Sie ein Array als Parameter an eine <a cbot|function>Funktion</a> übergeben, erhält die Funktion nur einen <a cbot|pointer>Zeiger</a> auf das Array. Wenn Elemente des Array in der Funktion verändert werden, werden diese Veränderungen sich auch auf die Funktion auswirken, die diese Funktion aufgerufen hat."
|
|
|
|
#. type: \b; header
|
|
#: ../E/bloc.txt:1
|
|
#, no-wrap
|
|
msgid "Blocks"
|
|
msgstr "Blöcke"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:2
|
|
#, no-wrap
|
|
msgid "You can use braces <code>{ }</code> to group a number of instructions together in order to make one single block out of them, for example: "
|
|
msgstr "Mit geschwungenen Klammern können Sie eine Reihe von Anweisungen in einen einzigen Block gruppieren, z.B.: "
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"Every instruction in the block is followed by a <a cbot|term>semicolon</a>, but the block itself is not. \n"
|
|
"Let us take the following example with the instruction <code><a cbot|if>if</a></code> to illustrate the use of blocks in a program:"
|
|
msgstr "Jede Anweisung im Block wird von einem <a cbot|term>Strichpunkt</a> gefolgt, aber nicht der eigentliche Block (kein Strichpunkt nach der Klammer <code>}</code>). Um den Zweck von Blöcken zu verstehen, nehmen wir das Beispiel einer <code><a cbot|if>if</a></code>-Anweisung:"
|
|
|
|
#. type: Source code
|
|
#: ../E/bloc.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif ( a < b )\n"
|
|
"\t\t<n/>instruction 1<c/>;\n"
|
|
"\t\t<n/>instruction 2<c/>;\n"
|
|
"\t<n/>instruction 3<c/>;"
|
|
msgstr ""
|
|
"\tif ( a < b )\n"
|
|
"\t\t<n/>Anweisung 1<c/>;\n"
|
|
"\t\t<n/>Anweisung 2<c/>;\n"
|
|
"\t<n/>Anweisung 3<c/>;"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"If the <a cbot|cond>condition</a> is true, instructions 1, 2 and 3 are performed. If the condition is false, only instruction 1 is ignored, instructions 2 and 3 are performed. The fact that instruction 2 is lined up with instruction 1 does not matter. \n"
|
|
"If you want to perform instructions 1 and 2 only if the condition is true, you have to bracket them together in a block: "
|
|
msgstr ""
|
|
"Wenn die <a cbot|cond>Bedingung</a> wahr ist, werden die Anweisungen 1, 2 und 3 ausgeführt. Wenn die Bedingung falsch ist, wird nur die Anweisung 1 übersprungen, die Anweisungen 2 und 3 werden ausgeführt. Die Tatsache, dass die Anweisung 2 wie die Anweisung 1 eingerückt ist, spielt keine Rolle.\n"
|
|
"Wenn die Anweisungen 1 und 2 nur ausgeführt werden sollen, wenn die Bedingung wahr ist, müssen Sie sie mit geschwungenen Klammern zu einem Block zusammenschließen:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:29
|
|
#, no-wrap
|
|
msgid ""
|
|
"Blocks may be needed with instructions <code><a cbot|if>if</a></code>, <code><a cbot|while>while</a></code> and <code><a cbot|for>for</a></code>, in order to group several instructions that should be performed only if a condition is true, or repeated several times. \n"
|
|
"You can fit blocks into other blocks, on as many levels as you need. Here is an example of imbrication on two levels :"
|
|
msgstr ""
|
|
"Blöcke werden vor allem mit den Anweisungen <code><a cbot|if>if</a></code>, <code><a cbot|while>while</a></code> und <code><a cbot|for>for</a></code> gebraucht. So können mehrere Anweisungen von einer Bedingung abhängig gemacht oder wiederholt werden.\n"
|
|
"Blöcke können auch auf mehreren Ebenen ineinander verschachtelt werden. Hier ist ein Beispiel einer Verschachtelung auf zwei Ebenen:"
|
|
|
|
#. type: Source code
|
|
#: ../E/bloc.txt:32
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif ( a > b )\n"
|
|
"\t{\n"
|
|
"\t\tint i = 0;\n"
|
|
"\t\twhile ( i < 18 )\n"
|
|
"\t\t{\n"
|
|
"\t\t\tmove(10);\n"
|
|
"\t\t\tturn(5);\n"
|
|
"\t\t\ti = i+1;\n"
|
|
"\t\t}\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tif ( a > b )\n"
|
|
"\t{\n"
|
|
"\t\tint i = 0;\n"
|
|
"\t\twhile ( i < 18 )\n"
|
|
"\t\t{\n"
|
|
"\t\t\tmove(10);\n"
|
|
"\t\t\tturn(5);\n"
|
|
"\t\t\ti = i+1;\n"
|
|
"\t\t}\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:43
|
|
#, no-wrap
|
|
msgid "You had better line up the open brace <code>{</code> with the closing brace <code>}</code> in order to improve readability, but it is not compulsory. The following example takes less space, is equivalent to the previous example, but it is not advisable to write your programs in the following style : "
|
|
msgstr "Der Programmeditor rückt die Anweisungen in einem Block automatisch ein (verschiebt sie nach rechts). So werden die Programme viel lesbarer. Zum Vergleich hier das gleiche Programm wie oben, aber ohne Einrückung und Zeilensprünge:"
|
|
|
|
#. type: Source code
|
|
#: ../E/bloc.txt:45
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif(a>b) { int i=0; while(i<18) {\n"
|
|
"\tmove(10);turn(5);i=i+1; }}"
|
|
msgstr ""
|
|
"\tif(a>b) { int i=0; while(i<18) {\n"
|
|
"\tmove(10);turn(5);i=i+1; }}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bloc.txt:49 ../E/do.txt:28 ../E/motor.txt:39 ../E/while.txt:47
|
|
#, no-wrap
|
|
msgid "<a cbot>Instructions</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr "Die \\l;CBOT-Sprache\\u cbot;, \\l;Variablentypen\\u cbot\\type; und \\l;Kategorien\\u cbot\\category;."
|
|
|
|
#. type: \b; header
|
|
#: ../E/bool.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>bool</code>"
|
|
msgstr "Variablentyp <code>bool</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/bool.txt:2
|
|
#, no-wrap
|
|
msgid "In a variable of this type you can put a boolean value, that is a value that can take only two states: true or false. "
|
|
msgstr "Eine <a cbot|cond>Bedingung</a> ergibt einen boolschen Wert, da die Bedingung entweder wahr (erfüllt) oder falsch (nicht erfüllt) sein kann."
|
|
|
|
#. type: \b; header
|
|
#: ../E/break.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>break</code>"
|
|
msgstr "Anweisung <code>break</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/break.txt:3
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>while ( condition )\n"
|
|
"{\n"
|
|
"\tbreak;\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>while ( bedingung )\n"
|
|
"{\n"
|
|
"\t...\n"
|
|
"\tbreak;\n"
|
|
"\t...\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/break.txt:8
|
|
#, no-wrap
|
|
msgid "With this instruction, you can get out immediately of a <code><a cbot|while>while</a></code> or <code><a cbot|for>for</a></code> loop."
|
|
msgstr "Mit dieser Anweisung können Sie unmittelbar eine <code><a cbot|while>while-</a></code> oder <code><a cbot|for>for-</a></code>Schleife beenden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/break.txt:10 ../E/continue.txt:10
|
|
#, no-wrap
|
|
msgid "Here is an example:"
|
|
msgstr "Hier ist ein Beispiel:"
|
|
|
|
#. type: Source code
|
|
#: ../E/break.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( true )\n"
|
|
"{\n"
|
|
"\t<n/>Instructions ...<c/>\n"
|
|
"\ti = i+1;\n"
|
|
"\tif ( i >= 10 )\n"
|
|
"\t{\n"
|
|
"\t\tbreak;\n"
|
|
"\t}\n"
|
|
"\t<n/>more instructions ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( true )\n"
|
|
"{\n"
|
|
"\t<n/>Anweisungen ...<c/>\n"
|
|
"\ti = i+1;\n"
|
|
"\tif ( i >= 10 )\n"
|
|
"\t{\n"
|
|
"\t\tbreak;\n"
|
|
"\t}\n"
|
|
"\t<n/>weitere Anweisungen ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/category.txt:1
|
|
#, no-wrap
|
|
msgid "Value <code>Categories</code>"
|
|
msgstr "<code>Kategorien</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:2
|
|
#, no-wrap
|
|
msgid "Categories represent the names of objects in the CBOT language. Everything in COLOBOT is an object: robots, buildings, raw materials, etc., even yourself."
|
|
msgstr "Kategorien stellen die Namen der Objekte in der CBOT-Sprache dar. Alles was Sie in COLOBOT sehen ist ein Objekt: Roboter, Bauten, Rohstoffe, usw., sogar Sie selbst."
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:34
|
|
#, no-wrap
|
|
msgid ""
|
|
" <code><a object|titanore>TitaniumOre</a> </code>Titanium Ore\n"
|
|
" <code><a object|uranore>UraniumOre</a> </code>Uranium Ore\n"
|
|
" <code><a object|titan>Titanium</a> </code>Cube of converted Titanium\n"
|
|
" <code><a object|power>PowerCell</a> </code>Regular Power Cell\n"
|
|
" <code><a object|atomic>NuclearCell</a> </code>Nuclear Power Cell\n"
|
|
" <code><a object|bullet>OrgaMatter</a> </code>Organic Matter\n"
|
|
" <code><a object|bbox>BlackBox</a> </code>Black Box\n"
|
|
" <code><a object|tnt>TNT</a> </code>Explosive device\n"
|
|
" <code><a object|key>KeyA..D</a> </code>Keys A, B, C and D"
|
|
msgstr ""
|
|
" <code><a object|titanore>TitaniumOre</a> </code>Titanerz\n"
|
|
" <code><a object|platore>PlatinumOre</a> </code>Platinerz\n"
|
|
" <code><a object|titan>Titanium</a> </code>Würfel aus metallischem Titan\n"
|
|
" <code><a object|power>PowerCell</a> </code>Elektrolytische Batterie\n"
|
|
" <code><a object|fuelcell>FuelCell</a> </code>Brennstoffzelle\n"
|
|
" <code><a object|bullet>OrgaMatter</a> </code>Orgastoff\n"
|
|
" <code><a object|bbox>BlackBox</a> </code>Flugschreiber\n"
|
|
" <code><a object|tnt>TNT</a> </code>Sprengstoff\n"
|
|
" <code><a object|key>KeyA..D</a> </code>Schlüssel A, B, C und D"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:47
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 158/> <code><a object|bottr>PracticeBot</a> </code>Practice Bot\n"
|
|
"<button 173/> <code><a object|bottarg>TargetBot</a> </code>Target Bot"
|
|
msgstr ""
|
|
"<button 158/> <code><a object|bottr>PracticeBot</a> </code>Übungsroboter\n"
|
|
"<button 173/> <code><a object|bottarg>TargetBot</a> </code>Mobile Zeilscheibe"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:50
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 137/> <code><a object|botgr>WheeledGrabber</a> </code>Wheeled Grabber\n"
|
|
"<button 138/> <code><a object|botgc>TrackedGrabber</a> </code>Tracked Grabber\n"
|
|
"<button 139/> <code><a object|botgj>WingedGrabber</a> </code>Winged Grabber\n"
|
|
"<button 150/> <code><a object|botgs>LeggedGrabber</a> </code>Legged Grabber"
|
|
msgstr ""
|
|
"<button 137/> <code><a object|botgr>WheeledGrabber</a> </code>Radtransporter\n"
|
|
"<button 138/> <code><a object|botgc>TrackedGrabber</a> </code>Kettentransporter\n"
|
|
"<button 139/> <code><a object|botgj>WingedGrabber</a> </code>Jettransporter\n"
|
|
"<button 150/> <code><a object|botgs>LeggedGrabber</a> </code>Krabbeltransporter"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:55
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 140/> <code><a object|botsr>WheeledSniffer</a> </code>Wheeled Sniffer\n"
|
|
"<button 141/> <code><a object|botsc>TrackedSniffer</a> </code>Tracked Sniffer\n"
|
|
"<button 142/> <code><a object|botsj>WingedSniffer</a> </code>Winged Sniffer\n"
|
|
"<button 152/> <code><a object|botss>LeggedSniffer</a> </code>Legged Sniffer"
|
|
msgstr ""
|
|
"<button 140/> <code><a object|botsr>WheeledSniffer</a> </code>Radschnüffler\n"
|
|
"<button 141/> <code><a object|botsc>TrackedSniffer</a> </code>Kettenschnüffler\n"
|
|
"<button 142/> <code><a object|botsj>WingedSniffer</a> </code>Jetschnüffler\n"
|
|
"<button 152/> <code><a object|botss>LeggedSniffer</a> </code>Krabbelschnüffler"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:60
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 143/> <code><a object|botfr>WheeledShooter</a> </code>Wheeled Shooter\n"
|
|
"<button 144/> <code><a object|botfc>TrackedShooter</a> </code>Tracked Shooter\n"
|
|
"<button 145/> <code><a object|botfj>WingedShooter</a> </code>Winged Shooter\n"
|
|
"<button 151/> <code><a object|botfs>LeggedShooter</a> </code>Legged Shooter"
|
|
msgstr ""
|
|
"<button 143/> <code><a object|botfr>WheeledShooter</a> </code>Radshooter\n"
|
|
"<button 144/> <code><a object|botfc>TrackedShooter</a> </code>Kettenshooter\n"
|
|
"<button 145/> <code><a object|botfj>WingedShooter</a> </code>Jetshooter\n"
|
|
"<button 151/> <code><a object|botfs>LeggedShooter</a> </code>Krabbelshooter"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:65
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 153/> <code><a object|botor>WheeledOrgaShooter</a> </code>Wheeled Orga Shooter\n"
|
|
"<button 154/> <code><a object|botoc>TrackedOrgaShooter</a> </code>Tracked Orga Shooter\n"
|
|
"<button 155/> <code><a object|botoj>WingedOrgaShooter</a> </code>Winged Orga Shooter\n"
|
|
"<button 156/> <code><a object|botos>LeggedOrgaShooter</a> </code>Legged Orga Shooter"
|
|
msgstr ""
|
|
"<button 153/> <code><a object|botor>WheeledOrgaShooter</a> </code>Radorgashooter\n"
|
|
"<button 154/> <code><a object|botoc>TrackedOrgaShooter</a> </code>Kettenorgashooter\n"
|
|
"<button 155/> <code><a object|botoj>WingedOrgaShooter</a> </code>Jetorgashooter\n"
|
|
"<button 156/> <code><a object|botos>LeggedOrgaShooter</a> </code>Krabbelorgashooter"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:75
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 149/> <code><a object|botsub>Subber</a> </code>Subber\n"
|
|
"<button 148/> <code><a object|botrecy>Recycler</a> </code>Recycler\n"
|
|
"<button 157/> <code><a object|botshld>Shielder</a> </code>Shielder\n"
|
|
"<button 146/> <code><a object|bottump>Thumper</a> </code>Thumper\n"
|
|
"<button 147/> <code><a object|botphaz>PhazerShooter</a> </code>Phazer Shooter"
|
|
msgstr ""
|
|
"<button 149/> <code><a object|botsub>Subber</a> </code>Kettentaucher\n"
|
|
"<button 148/> <code><a object|botrecy>Recycler</a> </code>Recycler\n"
|
|
"<button 157/> <code><a object|botshld>Shielder</a> </code>Schutzschild\n"
|
|
"<button 146/> <code><a object|bottump>Thumper</a> </code>Stampfer\n"
|
|
"<button 147/> <code><a object|botphaz>PhazerShooter</a> </code>Phazershooter"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:84
|
|
#, no-wrap
|
|
msgid ""
|
|
" <code><a object|mother>AlienQueen</a> </code>Alien Queen\n"
|
|
" <code><a object|egg>AlienEgg</a> </code>Alien Egg\n"
|
|
" <code><a object|ant>AlienAnt</a> </code>Ant\n"
|
|
" <code><a object|spider>AlienSpider</a> </code>Spider\n"
|
|
" <code><a object|wasp>AlienWasp</a> </code>Wasp\n"
|
|
" <code><a object|worm>AlienWorm</a> </code>Worm"
|
|
msgstr ""
|
|
" <code><a object|mother>AlienQueen</a> </code>Insektenkönigin\n"
|
|
" <code><a object|egg>AlienEgg</a> </code>Insektenei\n"
|
|
" <code><a object|ant>AlienAnt</a> </code>Ameise\n"
|
|
" <code><a object|spider>AlienSpider</a> </code>Spinne\n"
|
|
" <code><a object|wasp>AlienWasp</a> </code>Wespe\n"
|
|
" <code><a object|worm>AlienWorm</a> </code>Wurm"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:94
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 136/> <code><a object|human>Me</a> </code>You!\n"
|
|
" <code><a object|mine>Mine</a> </code>Mine\n"
|
|
" <code><a object|barrier>Barrier</a> </code>Barrier\n"
|
|
" <code><a object|wreck>Wreck</a> </code>Derelict bot\n"
|
|
" <code><a object|ruin>Ruin</a> </code>Derelict building"
|
|
msgstr ""
|
|
"<button 136/> <code><a object|human>Me</a> </code>Sie selbst!\n"
|
|
" <code><a object|mine>Mine</a> </code>Mine\n"
|
|
" <code><a object|barrier>Barrier</a> </code>Abschrankung\n"
|
|
" <code><a object|wreck>Wreck</a> </code>Roboterwrack\n"
|
|
" <code>Ruin </code>Gebäuderuine"
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:115
|
|
#, no-wrap
|
|
msgid "<a cbot>CBOT Language</a> and <a cbot|type>Variables</a>."
|
|
msgstr "Die <a cbot>CBOT-Sprache</a> und die <a cbot|type>Variablentypen</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>class</code>"
|
|
msgstr "Anweisung <code>class</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class ClassName\n"
|
|
"{\n"
|
|
"\tdeclarations;\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class NameDerKlasse\n"
|
|
"{\n"
|
|
"\t<n/>Deklarationen<c/>;\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/close.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>close</code>"
|
|
msgstr "Anweisung <code>close</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/close.txt:2
|
|
#, no-wrap
|
|
msgid "Close a file opened previously with <code><a cbot|open>open</a></code>. This is a method of the <code><a cbot|file>file</a></code> class; therefore you cannot write <code>close()</code> but only <code>handle.close()</code>:"
|
|
msgstr "Schließt eine Datei, die vorher mit <code><a cbot|open>open</a></code> geöffnet wurde. Dies ist eine Methode der Klasse <code><a cbot|file>file</a></code>; schreiben Sie deshalb nicht <code>close()</code> sondern immer <code>handle.close()</code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/close.txt:4
|
|
#, no-wrap
|
|
msgid "\thandle.close();"
|
|
msgstr "\thandle.close();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/close.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|file>Dateien</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> und <code><a cbot|eof>eof</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/cond.txt:1
|
|
#, no-wrap
|
|
msgid "Conditions"
|
|
msgstr "Die Bedingungen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:116
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>a == b </code><code>a</code> equals <code>b</code>\n"
|
|
"<code>a != b </code><code>a</code> is different from <code>b</code>\n"
|
|
"<code>a < b </code><code>a</code> smaller than <code>b</code>\n"
|
|
"<code>a <= b </code><code>a</code> smaller than or equal to <code>b</code>\n"
|
|
"<code>a > b </code><code>a</code> greater than <code>b</code>\n"
|
|
"<code>a >= b </code><code>a</code> greater than or equal to <code>b</code>"
|
|
msgstr ""
|
|
"<code>a == b </code><code>a</code> gleich <code>b</code>\n"
|
|
"<code>a != b </code><code>a</code> ungleich <code>b</code>\n"
|
|
"<code>a < b </code><code>a</code> kleiner als <code>b</code>\n"
|
|
"<code>a <= b </code><code>a</code> kleiner oder gleich <code>b</code>\n"
|
|
"<code>a > b </code><code>a</code> größer als <code>b</code>\n"
|
|
"<code>a >= b </code><code>a</code> größer oder gleich <code>b</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:124
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>12 == 12 </code>returns true\n"
|
|
"<code>45 != 47 </code>returns true \n"
|
|
"<code>99 == 98 </code>returns false\n"
|
|
"<code>12 < -1 </code>returns false\n"
|
|
"<code>12 >= 10 </code>returns true \n"
|
|
"<code>12 >= 12 </code>returns true "
|
|
msgstr ""
|
|
"<code>12 == 12 </code>ergibt wahr\n"
|
|
"<code>45 != 47 </code>ergibt wahr \n"
|
|
"<code>99 == 98 </code>ergibt falsch\n"
|
|
"<code>12 < -1 </code>ergibt falsch\n"
|
|
"<code>12 >= 10 </code>ergibt wahr\n"
|
|
"<code>12 >= 12 </code>ergibt wahr "
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:132
|
|
#, no-wrap
|
|
msgid "Be careful not to confuse the equality comparison <code>==</code> with the assignment of a <a cbot|var>variable</a> <code>=</code>."
|
|
msgstr "Bitte verwechseln Sie nicht den Gleich-Operator <code>==</code> mit der Zuweisung einer <a cbot|var>Variable</a> <code>=</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:134
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>a == b</code> is an expression that compares <code>a</code> with <code>b</code>.\n"
|
|
"<code>a = b</code> is an expression that copies the value of <code>b</code> into <code>a</code>."
|
|
msgstr ""
|
|
"<code>a == b</code> ist ein Ausdruck, der <code>a</code> mit <code>b</code> vergleicht.\n"
|
|
"<code>a = b</code> ist ein Ausdruck, der den Wert von <code>b</code> in <code>a</code> kopiert."
|
|
|
|
#. type: \b; header
|
|
#: ../E/continue.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>continue</code>"
|
|
msgstr "Anweisung <code>continue</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/continue.txt:3
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>while ( condition )\n"
|
|
"{\n"
|
|
"\tcontinue;\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>while ( bedingung )\n"
|
|
"{\n"
|
|
"\t...\n"
|
|
"\tcontinue;\n"
|
|
"\t...\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/continue.txt:8
|
|
#, no-wrap
|
|
msgid "With this instruction, you can jump over the rest of instructions in the <code><a cbot|bloc>bloc</a></code> of a <code><a cbot|while>while</a></code> or <code><a cbot|for>for</a></code> loop: The execution will resume at the beginning of the bloc, the next time the loop is repeated."
|
|
msgstr "Mit dieser Anweisung können Sie über den Rest der Anweisungen im <code><a cbot|bloc>Block</a></code> einer <code><a cbot|while>while</a></code>- oder <code><a cbot|for>for</a></code>-Schleife springen: Die Ausführung des Programms fährt am Anfang des Blocks fort, das nächste Mal, dass die Schleife wiederholt wird."
|
|
|
|
#. type: Source code
|
|
#: ../E/continue.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( i < 5 )\n"
|
|
"{\n"
|
|
"\ti = i+1;\n"
|
|
"\tif ( i == 3 )\n"
|
|
"\t{\n"
|
|
"\t\tcontinue;\n"
|
|
"\t}\n"
|
|
"\t<n/>Instructions ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( i < 5 )\n"
|
|
"{\n"
|
|
"\ti = i+1;\n"
|
|
"\tif ( i == 3 )\n"
|
|
"\t{\n"
|
|
"\t\tcontinue;\n"
|
|
"\t}\n"
|
|
"\t<n/>Anweisungen ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/continue.txt:22
|
|
#, no-wrap
|
|
msgid "The instructions will only be executed for the values of <code>i</code> 1, 2, 4 and 5."
|
|
msgstr "Die weiteren Anweisungen werden nur für die Werte von <code>i</code> 1, 2, 4 und 5 ausgeführt."
|
|
|
|
#. type: \b; header
|
|
#: ../E/deletef.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>deletefile</code>"
|
|
msgstr "Anweisung <code>deletefile</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/deletef.txt:2
|
|
#, no-wrap
|
|
msgid "The deletefile instruction deletes an existing file in the files/ folder. "
|
|
msgstr "Diese Anweisung löscht eine bestehende Datei im Ordner <c/>\\files\\<n/>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/deletef.txt:4
|
|
#, no-wrap
|
|
msgid "Files can only be deleted in the files/ folder which is located in the folder inside Colobot save directory. You cannot not delete files that are located elsewhere than in the files/ folder."
|
|
msgstr "Dateien können nur gelöscht werden, wenn sie sich im Ordner <c/>\\files\\<n/> befinden, der sich im Ordner befindet, in dem Colobot installiert wurde. Dateien in anderen Ordnern können mit dieser Anweisung nicht gelöscht werden."
|
|
|
|
#. type: Source code
|
|
#: ../E/deletef.txt:7
|
|
#, no-wrap
|
|
msgid "<c/>deletefile ( filename );<n/>"
|
|
msgstr "<c/>deletefile ( dateiname );<n/>"
|
|
|
|
#. type: \b; header
|
|
#: ../E/delinfo.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>deleteinfo</code>"
|
|
msgstr "Anweisung <code>deleteinfo</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/delinfo.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>deleteinfo ( name, power );<n/>"
|
|
msgstr "<c/>deleteinfo ( name, reichweite );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/delinfo.txt:5
|
|
#, no-wrap
|
|
msgid "Delete an existing information in the closest <a object|exchange>information exchange post</a>."
|
|
msgstr "Löscht eine bestehende Information im nächsten <a object|exchange>Infoserver</a>."
|
|
|
|
#. type: \t; header
|
|
#: ../E/delinfo.txt:7 ../E/receive.txt:7 ../E/send.txt:7 ../E/testinfo.txt:7
|
|
#, no-wrap
|
|
msgid "name: <code>string</code>"
|
|
msgstr "name: <code><a cbot|string>string</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/delinfo.txt:8
|
|
#, no-wrap
|
|
msgid "Name of the information to be deleted. This name is a string: it must be written in quotation marks \"\"."
|
|
msgstr "Name der Information, die gelöscht werden soll. Dieser Name ist ein String (Zeichenkette): er muss also in Anführungszeichen \"\" geschrieben werden."
|
|
|
|
#. type: \t; header
|
|
#: ../E/delinfo.txt:10 ../E/receive.txt:10 ../E/send.txt:14 ../E/testinfo.txt:10
|
|
#, no-wrap
|
|
msgid "power: <code>float</code>"
|
|
msgstr "reichweite: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/delinfo.txt:11
|
|
#, no-wrap
|
|
msgid "Power of the transmitter, which corresponds to the maximal distance between the sender and the exchange post. If the distance is longer, the information won't be deleted. Default value is 10 metres."
|
|
msgstr "Reichweite der Übermittlung, die der maximalen Distanz zwischen dem Roboter und dem Infoserver entspricht. Wenn die Distanz länger ist, wird die Information nicht gelöscht. Der Standardwert beträgt 10 Meter."
|
|
|
|
#. type: Plain text
|
|
#: ../E/delinfo.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> and <code><a cbot|testinfo>testinfo</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> und <code><a cbot|testinfo>testinfo</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/direct.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>direction</code>"
|
|
msgstr "Anweisung <code>direction</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/direct.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>direction ( pos );<n/>"
|
|
msgstr "<c/>direction ( position );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/direct.txt:5
|
|
#, no-wrap
|
|
msgid "Calculates the rotation that a robot must perform in order to point towards a given position. "
|
|
msgstr "Berechnet die Drehung die der Roboter ausführen muss, damit er auf die angegebene Position ausgerichtet ist (zu ihr hin schaut)."
|
|
|
|
#. type: \t; header
|
|
#: ../E/direct.txt:7 ../E/goto.txt:17
|
|
#, no-wrap
|
|
msgid "pos: <code><a cbot|point>point</a></code>"
|
|
msgstr "position: <code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/direct.txt:8
|
|
#, no-wrap
|
|
msgid "Position towards which the robot must point."
|
|
msgstr "Position, auf die der Roboter ausgerichtet werden soll."
|
|
|
|
#. type: \t; header
|
|
#: ../E/acos.txt:8 ../E/asin.txt:8 ../E/atan.txt:8 ../E/atan2.txt:13 ../E/ceil.txt:9 ../E/cos.txt:8 ../E/direct.txt:10 ../E/dist.txt:26 ../E/dist2d.txt:10 ../E/flatgrnd.txt:13 ../E/floor.txt:9 ../E/pow.txt:11 ../E/rand.txt:5 ../E/receive.txt:13 ../E/round.txt:9 ../E/sin.txt:8 ../E/sqrt.txt:8 ../E/tan.txt:8 ../E/topo.txt:10 ../E/trunc.txt:9
|
|
#, no-wrap
|
|
msgid "Return value: <code><a cbot|float>float</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/direct.txt:11
|
|
#, no-wrap
|
|
msgid "Angle of the rotation that must be performed. -90 means f. ex. a rotation of 90 degrees to the right. "
|
|
msgstr "Winkel der Drehung, die ausgeführt werden soll. -90 z.B. bedeutet eine Drehung von 90 Grad (rechter Winkel) nach rechts."
|
|
|
|
#. type: \b; header
|
|
#: ../E/dist.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>distance</code>"
|
|
msgstr "Anweisung <code>distance</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:2
|
|
#, no-wrap
|
|
msgid "With the instruction <code>distance( , )</code> you can calculate the distance between two positions."
|
|
msgstr "Mit der Anweisung <code>distance( , )</code> können Sie die Distanz zwischen zwei Positionen berechnen."
|
|
|
|
#. type: \b; header
|
|
#: ../E/build.txt:4 ../E/buildingenabled.txt:4 ../E/canbuild.txt:4 ../E/dist.txt:4 ../E/drop.txt:4 ../E/fire.txt:4 ../E/function.txt:16 ../E/goto.txt:4 ../E/grab.txt:4 ../E/if.txt:4 ../E/motor.txt:4 ../E/move.txt:4 ../E/radar.txt:4 ../E/switch.txt:4 ../E/turn.txt:4 ../E/wait.txt:4 ../E/while.txt:4
|
|
#, no-wrap
|
|
msgid "Basic use"
|
|
msgstr "Grundlagen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:5
|
|
#, no-wrap
|
|
msgid "If you write <code>position</code> alone, this gives you the position of the bot that executes the program. If you write the name of a variable followed by <code>.position</code>, this gives you the position of the object described in the variable."
|
|
msgstr "Wenn Sie <code>position</code> alleine schreiben erhalten Sie die Position des Roboters, der das Programm ausführt. Wenn Sie den Namen einer Variable gefolgt von <code>.position</code> schreiben, erhalten Sie die Position des Objekts, das von der Variable beschrieben ist. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:7
|
|
#, no-wrap
|
|
msgid "Here is a program that moves forward, covering exactly the distance between the bot and the closest ant:"
|
|
msgstr "Hier ist ein Beispiel eines Programms, das den Roboter genau um die Distanz vorwärts bewegt, die den Roboter von der nächsten Ameise trennt:"
|
|
|
|
#. type: Source code
|
|
#: ../E/dist.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
|
"\t<a cbot|move>move</a>(distance(position, item.position));"
|
|
msgstr ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
|
"\t<a cbot|move>move</a>(distance(position, item.position));"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:12
|
|
#, no-wrap
|
|
msgid "This is of course pure suicide. Better to stop 40 meters before, in order to be at shooting range:"
|
|
msgstr "Dies ist natürlich reiner Selbstmord. Es ist besser, 40 Meter vor der Ameise zu stoppen, um in Schussweite zu sein:"
|
|
|
|
#. type: Source code
|
|
#: ../E/dist.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = radar(AlienAnt);\n"
|
|
"\tmove(distance(position, item.position) - 40);"
|
|
msgstr ""
|
|
"\titem = radar(AlienAnt);\n"
|
|
"\tmove(distance(position, item.position) - 40);"
|
|
|
|
#. type: \b; header, \t; header
|
|
#: ../E/build.txt:13 ../E/buildingenabled.txt:12 ../E/canbuild.txt:12 ../E/detect.txt:4 ../E/dist.txt:17 ../E/drop.txt:11 ../E/errmode.txt:4 ../E/file.txt:10 ../E/fire.txt:9 ../E/float.txt:19 ../E/goto.txt:11 ../E/grab.txt:11 ../E/if.txt:22 ../E/int.txt:13 ../E/motor.txt:14 ../E/move.txt:7 ../E/radar.txt:13 ../E/radarall.txt:11 ../E/return.txt:9 ../E/switch.txt:46 ../E/turn.txt:18 ../E/wait.txt:9 ../E/while.txt:19
|
|
#, no-wrap
|
|
msgid "For specialists"
|
|
msgstr "Für Spezialisten"
|
|
|
|
#. type: Plain text, \t; header
|
|
#: ../E/abstime.txt:2 ../E/acos.txt:2 ../E/aim.txt:2 ../E/asin.txt:2 ../E/atan.txt:2 ../E/atan2.txt:2 ../E/build.txt:14 ../E/buildingenabled.txt:13 ../E/busy.txt:2 ../E/canbuild.txt:13 ../E/canresearch.txt:2 ../E/ceil.txt:2 ../E/cos.txt:2 ../E/deletef.txt:6 ../E/delinfo.txt:2 ../E/destroy.txt:2 ../E/detect.txt:5 ../E/dist.txt:18 ../E/dist2d.txt:2 ../E/do.txt:2 ../E/drop.txt:12 ../E/errmode.txt:5 ../E/factory.txt:2 ../E/fire.txt:10 ../E/flatgrnd.txt:2 ../E/flatspace.txt:2 ../E/floor.txt:2 ../E/for.txt:2 ../E/goto.txt:12 ../E/grab.txt:12 ../E/if.txt:23 ../E/jet.txt:2 ../E/message.txt:2 ../E/move.txt:8 ../E/pencolor.txt:2 ../E/pendown.txt:2 ../E/penup.txt:2 ../E/penwidth.txt:2 ../E/pow.txt:2 ../E/produce.txt:2 ../E/radar.txt:14 ../E/radarall.txt:12 ../E/rand.txt:2 ../E/readln.txt:8 ../E/receive.txt:2 ../E/recycle.txt:2 ../E/research.txt:2 ../E/researched.txt:2 ../E/retobj.txt:2 ../E/round.txt:2 ../E/search.txt:2 ../E/send.txt:2 ../E/shield.txt:2 ../E/sin.txt:2 ../E/sniff.txt:2 ../E/space.txt:2 ../E/sqrt.txt:2 ../E/strfind.txt:4 ../E/strleft.txt:4 ../E/strlen.txt:4 ../E/strlower.txt:4 ../E/strmid.txt:4 ../E/strright.txt:4 ../E/strupper.txt:4 ../E/strval.txt:8 ../E/switch.txt:47 ../E/takeoff.txt:2 ../E/tan.txt:2 ../E/testinfo.txt:2 ../E/thump.txt:2 ../E/topo.txt:2 ../E/trunc.txt:2 ../E/turn.txt:19 ../E/wait.txt:10 ../E/writeln.txt:8
|
|
#, no-wrap
|
|
msgid "Syntax:"
|
|
msgstr "Syntax:"
|
|
|
|
#. type: Source code
|
|
#: ../E/dist.txt:19
|
|
#, no-wrap
|
|
msgid "<c/>distance ( pos1, pos2 );<n/>"
|
|
msgstr "<c/>distance ( position1, position2 );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:21
|
|
#, no-wrap
|
|
msgid "Calculates the distance between two positions. "
|
|
msgstr "Berechnet die Distanz zwischen zwei Positionen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/dist.txt:23 ../E/dist2d.txt:7
|
|
#, no-wrap
|
|
msgid "pos1, pos2: <code><a cbot|point>point</a></code>"
|
|
msgstr "position1, position2: <code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:24 ../E/dist2d.txt:8
|
|
#, no-wrap
|
|
msgid "Coordinates of the two positions. "
|
|
msgstr "Koordinaten der zwei Positionen. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist.txt:27 ../E/dist2d.txt:11
|
|
#, no-wrap
|
|
msgid "Distance between the two positions."
|
|
msgstr "Distanz zwischen den zwei Positionen."
|
|
|
|
#. type: \b; header
|
|
#: ../E/dist2d.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>distance2d</code>"
|
|
msgstr "Anweisung <code>distance2d</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/dist2d.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>distance2d ( pos1, pos2 );<n/>"
|
|
msgstr "<c/>distance2d ( position1, position2 );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/dist2d.txt:5
|
|
#, no-wrap
|
|
msgid "Calculates the distance between two positions (ignores the z coordinate)."
|
|
msgstr "Diese Anweisung funktioniert ähnlich wie <c/><a cbot|dist>distance</a>();<n/>. Sie berechnet die Distanz zwischen zwei Positionen, wobei jedoch der Höhenunterschied nicht beachtet wird."
|
|
|
|
#. type: \b; header
|
|
#: ../E/do.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>do - while</code>"
|
|
msgstr "Anweisung <code>do - while</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/do.txt:3
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>do\n"
|
|
"{\n"
|
|
"\t</code>Instructions ...<c/>\n"
|
|
"}\n"
|
|
"while ( condition );"
|
|
msgstr ""
|
|
"<code>do\n"
|
|
"{\n"
|
|
"\t</code>Anweisungen ...<c/>\n"
|
|
"}\n"
|
|
"while ( <a cbot|cond>bedingung</a> );"
|
|
|
|
#. type: Plain text
|
|
#: ../E/do.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"This instruction allows you to perform several times the instructions inside the <a cbot|bloc>block</a>. The instructions are executed at least once, because the condition is tested only afterwards.\n"
|
|
"Be careful not to confuse the instruction <c/>do { } while ( );<n/> with the instruction <code><a cbot|while>while</a> ( ) { }</code>; the latter tests the condition before the instructions in the block are executed. "
|
|
msgstr ""
|
|
"Mit dieser Anweisung können Sie mehrmals die Anweisungen in dem <a cbot|bloc>Block</a> ausführen. Die Anweisungen werden mindestens einmal ausgeführt, da die Bedingung erst nachher getestet wird.\n"
|
|
"Verwechseln Sie nicht die Anweisung <c/>do{}while();<n/> mit der Anweisung <code><a cbot|while>while</a>(){}</code>. Letztere testet die Bedingung, bevor die Anweisungen im Block ausgeführt werden. "
|
|
|
|
#. type: \t; header
|
|
#: ../E/do.txt:12 ../E/for.txt:13 ../E/while.txt:30
|
|
#, no-wrap
|
|
msgid "<code>condition</code>"
|
|
msgstr "<code>bedingung</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/do.txt:13 ../E/while.txt:31
|
|
#, no-wrap
|
|
msgid "The instructions in the block are performed over and over again, as long as the <a cbot|cond>condition</a> is true. "
|
|
msgstr "Die Anweisungen im Block werden immer und immer wieder ausgeführt, solange die <a cbot|cond>Bedingung</a> wahr ist. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/do.txt:15 ../E/while.txt:33
|
|
#, no-wrap
|
|
msgid "Here is an example :"
|
|
msgstr "Hier ist ein Beispiel:"
|
|
|
|
#. type: Source code
|
|
#: ../E/do.txt:16
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>do\n"
|
|
"{\n"
|
|
"\tp = radar(TitaniumOre);\n"
|
|
"}\n"
|
|
"while ( p == null );"
|
|
msgstr ""
|
|
"<c/>do\n"
|
|
"{\n"
|
|
"\tp = <a cbot|radar>radar</a>(<a cbot|category>TitaniumOre</a>);\n"
|
|
"}\n"
|
|
"while ( p == <a cbot|null>null</a> );"
|
|
|
|
#. type: \t; header
|
|
#: ../E/do.txt:22 ../E/float.txt:11 ../E/for.txt:33 ../E/if.txt:36 ../E/int.txt:10 ../E/switch.txt:67 ../E/while.txt:41
|
|
#, no-wrap
|
|
msgid "Attention"
|
|
msgstr "Achtung"
|
|
|
|
#. type: Plain text
|
|
#: ../E/do.txt:23
|
|
#, no-wrap
|
|
msgid "Always put a <a cbot|term>semicolon</a> at the end of the line <code>while ( )</code>."
|
|
msgstr "Im Gegensatz zur <code><a cbot|while>while</a>(){}</code>-Schleife braucht es hier einen <a cbot|term>Strichpunkt</a> am Ende der <code>while()</code>-Zeile."
|
|
|
|
#. type: Plain text
|
|
#: ../E/do.txt:25
|
|
#, no-wrap
|
|
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>do { }</code>."
|
|
msgstr "Die Anweisungen <code><a cbot|break>break</a></code> und <code><a cbot|continue>continue</a></code> können im Block einer <code>do{}</code>-Anweisung eingesetzt werden."
|
|
|
|
#. type: \b; header
|
|
#: ../E/drop.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>drop</code>"
|
|
msgstr "Anweisung <code>drop</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/drop.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>drop();<n/> instructs the bot to drop whatever the operating arm is carrying on the ground, on the platform of a building or on the power cell location of a bot."
|
|
msgstr "Der Befehl <c/>drop();<n/> weist den Roboter an, was er in seinem Greifer hält abzulegen, sei es auf den Boden, auf die Basisplatform von verschiedenen Bauten oder auf die Batterieladefläche eines Roboters."
|
|
|
|
#. type: Plain text
|
|
#: ../E/drop.txt:5
|
|
#, no-wrap
|
|
msgid "The instruction <c/>drop();<n/> written in this form drops the object in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further:"
|
|
msgstr "Der Befehl <c/>drop();<n/> in dieser Form legt den Gegenstand vor dem Roboter ab. Hier ist ein kurzes Programm, das einen Gegenstand vor dem Roboter ergreift und 5 Meter weiter wieder ablegt:"
|
|
|
|
#. type: Source code
|
|
#: ../E/drop.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t<a cbot|grab>grab</a>();\n"
|
|
"\t<a cbot|move>move</a>(5);\n"
|
|
"\tdrop();"
|
|
msgstr ""
|
|
"\t<a cbot|grab>grab</a>();\n"
|
|
"\t<a cbot|move>move</a>(5);\n"
|
|
"\tdrop();"
|
|
|
|
#. type: Source code
|
|
#: ../E/drop.txt:13
|
|
#, no-wrap
|
|
msgid "<c/>drop ( oper );<n/>"
|
|
msgstr "<c/>drop ( ort );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/drop.txt:15
|
|
#, no-wrap
|
|
msgid "This instruction appeals to the operating arm of a <a object|botgr>grabber bot</a>, in order to drop what it is holding."
|
|
msgstr "Diese Anweisung weist den Greifer eines <a object|botgr>Transporters</a> an, was er in seinem Greifer hält an einer bestimmten Stelle abzulegen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/drop.txt:17 ../E/grab.txt:17
|
|
#, no-wrap
|
|
msgid "oper: <code><a cbot|int>int</a></code> (default value<code>InFront</code>)"
|
|
msgstr "ort: <code><a cbot|int>int</a></code> (Standardwert <code>InFront</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/drop.txt:18
|
|
#, no-wrap
|
|
msgid ""
|
|
"Oper indicates where the robot should drop the object. If no indication is given, the object is dropped in front of the bot. \n"
|
|
"<code>InFront </code> Drops in front (default value).\n"
|
|
"<code>Behind </code> Drops behind.\n"
|
|
"<code>EnergyCell</code> Drops on the bot's own power cell location."
|
|
msgstr ""
|
|
"ort gibt an, wo der Roboter den Gegenstand hinlegen soll. Wenn kein Ort angegeben ist, wird der Gegenstand vor dem Roboter abgelegt.\n"
|
|
"<code>InFront </code> Legt den Gegenstand vor dem Roboter ab (Standardwert).\n"
|
|
"<code>Behind </code> Legt den Gegenstand hinter dem Roboter ab.\n"
|
|
"<code>EnergyCell</code> Legt den Gegenstand auf die eigene Batterieladefläche ab."
|
|
|
|
#. type: Plain text
|
|
#: ../E/drop.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>drop();<n/>.\n"
|
|
"<code>== 0 </code>object was dropped\n"
|
|
"<code>!= 0 </code>error, no object was dropped"
|
|
msgstr ""
|
|
"Normalerweise bewirkt ein Fehler, dass das Programm angehalten wird. Wenn Sie wollen, dass das Programm durch einen Fehler nicht angehalten wird, benutzen Sie den Befehl <code><a cbot|errmode>errmode</a>(0)</code>. In diesem Fall gibt der Befehl einen Wert verschieden von Null zurück, wenn beim Ausführen von <c/>drop();<n/> ein Fehler aufgetreten ist.\n"
|
|
"<code>== 0 </code>Der Gegenstand konnte abgelegt werden\n"
|
|
"<code>!= 0 </code>Fehler, der Gegenstand konnte nicht abgelegt werden"
|
|
|
|
#. type: \b; header
|
|
#: ../E/eof.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>eof</code>"
|
|
msgstr "Anweisung <code>eof</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/eof.txt:2
|
|
#, no-wrap
|
|
msgid "Test the end of file condition of an open file. This is a method of the <code><a cbot|file>file</a></code> class; therefore you cannot write <code>eof()</code> but only <code>handle.eof()</code>:"
|
|
msgstr "Testet, ob eine geöffnete Datei zu Ende gelesen wurde. Dies ist eine Methode der <code><a cbot|file>file</a></code>-Klasse. Sie können also nicht einfach <code>eof()</code> schreiben, sondern müssen immer eine Variable vom Typ <code>file</code> gefolgt von einem Punkt und der Anweisung <code>eof()</code> schreiben, z.B. <code>handle.eof()</code>. In diesem Beispiel wird so lange eine Zeile aus der Datei gelesen, bis das Ende der Datei erreicht ist:"
|
|
|
|
#. type: Source code
|
|
#: ../E/eof.txt:4
|
|
#, no-wrap
|
|
msgid "\tif ( handle.eof() ) "
|
|
msgstr "\tif ( handle.eof() )"
|
|
|
|
#. type: Plain text
|
|
#: ../E/eof.txt:6 ../E/readln.txt:11
|
|
#, no-wrap
|
|
msgid "Example:"
|
|
msgstr "Beispiel:"
|
|
|
|
#. type: Source code
|
|
#: ../E/eof.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"\twhile ( not handle.eof() )\n"
|
|
"\t{\n"
|
|
"\t\ts = handle.readln();\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\twhile ( not handle.eof() )\n"
|
|
"\t{\n"
|
|
"\t\ts = handle.readln();\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/eof.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> and <code><a cbot|writeln>writeln</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|file>Datei</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> und <code><a cbot|writeln>writeln</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/errmode.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>errmode</code>"
|
|
msgstr "Anweisung <code>errmode</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/errmode.txt:2
|
|
#, no-wrap
|
|
msgid "The <c/>errmode();<n/> instruction allows you to chose if the program should stop when an error occurs in one of the following instructions: <code><a cbot|goto>goto</a></code>, <code><a cbot|move>move</a></code>, <code><a cbot|grab>grab</a></code>, <code><a cbot|drop>drop</a></code>, etc."
|
|
msgstr "Mit der Anweisung <c/>errmode();<n/> können Sie bestimmen ob das Programm anhalten soll, wenn in einer der folgenden Anweisungen ein Fehler auftaucht: <code><a cbot|goto>goto</a></code>, <code><a cbot|move>move</a></code>, <code><a cbot|grab>grab</a></code>, <code><a cbot|drop>drop</a></code>, usw."
|
|
|
|
#. type: Source code
|
|
#: ../E/errmode.txt:6
|
|
#, no-wrap
|
|
msgid "<c/>errmode ( mode );<n/>"
|
|
msgstr "<c/>errmode ( modus );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/errmode.txt:8
|
|
#, no-wrap
|
|
msgid "Normally the program is stopped when an error occurs. If you use the instruction <c/>errmode(0);<n/> at the beginning of the program, the instructions listed above return a value different from zero if the instruction could not be performed."
|
|
msgstr "Normalerweise wird das Programm angehalten, wenn ein Fehler auftritt. Wenn Sie die Anweisung <c/>errmode(0);<n/> am Anfang des Programms schreiben, wird das Programm bei einem Fehler nicht angehalten, die betroffene Anweisung gibt jedoch einen Wert verschieden von Null zurück, wenn sie nicht fehlerfrei ausgeführt werden konnte."
|
|
|
|
#. type: \t; header
|
|
#: ../E/errmode.txt:10
|
|
#, no-wrap
|
|
msgid "mode: <code><a cbot|float>float</a></code> (<code>1</code> per default)"
|
|
msgstr "modus: <code><a cbot|float>float</a></code> (Standardwert <code>1</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/errmode.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"Error treatment mode.\n"
|
|
"<code>0</code> -> continues program execution and returns a non zero value\n"
|
|
"<code>1</code> -> stops the program (default behavior)"
|
|
msgstr ""
|
|
"Fehlerverarbeitungsmodus.\n"
|
|
"<code>0</code> -> Fährt bei einem Fehler mit der Ausführung des Programms fort, und gibt einen Wert verschieden von Null zurück\n"
|
|
"<code>1</code> -> Hält das Programm bei einem Fehler an (Standard)."
|
|
|
|
#. type: Plain text
|
|
#: ../E/errmode.txt:15
|
|
#, no-wrap
|
|
msgid "Example 1:"
|
|
msgstr "Im ersten Beispiel wird der Befehl <code>goto(pos)</code> nach einer kurzen Pause solange erneut ausgeführt, bis er fehlerfrei ausgeführt werden kann:"
|
|
|
|
#. type: Source code
|
|
#: ../E/errmode.txt:16
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>errmode(0);\n"
|
|
"while ( goto(pos) != 0 )\n"
|
|
"{\n"
|
|
"\twait(2);\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>errmode(0);\n"
|
|
"while ( goto(pos) != 0 )\n"
|
|
"{\n"
|
|
"\twait(2);\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/errmode.txt:22
|
|
#, no-wrap
|
|
msgid "Example 2:"
|
|
msgstr "Im zweiten Beispiel wird mit einem einfachen \\c;\\l;if\\u cbot\\if;\\n; getestet, ob ein Fehler auftrat. Wenn ja, kann ein alternatives Verhalten vorgesehen werden:"
|
|
|
|
#. type: Source code
|
|
#: ../E/errmode.txt:23
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>errmode(0);\n"
|
|
"int err;\n"
|
|
"err = goto(pos);\n"
|
|
"if ( err != 0 )\n"
|
|
"{\n"
|
|
"\t<n/>goto did not perform correctly ...<code>\n"
|
|
"\t</code>take some appropriate action ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>errmode(0);\n"
|
|
"int err;\n"
|
|
"err = goto(pos);\n"
|
|
"if ( err != 0 )\n"
|
|
"{\n"
|
|
"\t<n/>goto konnte nicht ausgeführt werden ...<code>\n"
|
|
"\t</code>versuche ein alternatives Verhalten ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:1
|
|
#, no-wrap
|
|
msgid "Expressions"
|
|
msgstr "Ausdrücke"
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:86
|
|
#, no-wrap
|
|
msgid "is equivalent to"
|
|
msgstr "entspricht folgendem Ausdruck ohne Kurzform:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:90
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>+=</code> addition\n"
|
|
"<code>-=</code> subtraction\n"
|
|
"<code>*=</code> multiplication\n"
|
|
"<code>/=</code> division\n"
|
|
"<code>%=</code> remainder of the division (only for the type <code><a cbot|int>int</a></code>)"
|
|
msgstr ""
|
|
"<code>+=</code> addieren\n"
|
|
"<code>-=</code> subtrahieren\n"
|
|
"<code>*=</code> multiplizieren\n"
|
|
"<code>/=</code> dividieren\n"
|
|
"<code>%=</code> Rest der Division (nur für den Typ <code><a cbot|int>int</a></code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:178
|
|
#, no-wrap
|
|
msgid "The operators <code>++</code> and <code>--</code> allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner."
|
|
msgstr "Mit den Operatore <code>++</code> und <code>--</code> können Sie eine Variable mit einer sehr kurzen Schreibform inkrementieren (1 addieren) bzw. dekrementieren (1 subtrahieren)."
|
|
|
|
#. type: \b; header
|
|
#: ../E/extern.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>extern</code>"
|
|
msgstr "Anweisung <code>extern</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/extern.txt:2
|
|
#, no-wrap
|
|
msgid "The <code>extern</code> instruction determines the <a cbot|function>function</a> that acts as main program of a robot. The name of the function declared with <code>extern</code> will apear in the program list in the lower left corner of the screen."
|
|
msgstr "Die Anweisung <code>extern</code> bestimmt, welche <a cbot|function>Funktion</a> das Hauptprogramm (main-Programm) des Roboters ist. Der Name dieser Funktion erscheint in der Liste der Programme des Roboters links unten am Bildschirm. Wenn dieses Programm ausgeführt wird, wird zuerst die Haupfunktion ausgeführt."
|
|
|
|
#. type: Source code
|
|
#: ../E/extern.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::MowDown( )\n"
|
|
"{\n"
|
|
"\twhile ( true )\n"
|
|
"\t{\n"
|
|
"\t\tfire(1);\n"
|
|
"\t\tturn(10);\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::MowDown( )\n"
|
|
"{\n"
|
|
"\twhile ( true )\n"
|
|
"\t{\n"
|
|
"\t\tfire(1);\n"
|
|
"\t\tturn(10);\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/extern.txt:13
|
|
#, no-wrap
|
|
msgid "If the program contains other functions, only the main function must be preceded by <code>extern</code>."
|
|
msgstr "Wenn das Programm noch andere Funktionen enhält, darf nur die Hauptfunktion die Anweisung <code>extern</code> vor der Deklaration der Funktion enthalten."
|
|
|
|
#. type: Source code
|
|
#: ../E/extern.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Square( )\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i++ )\n"
|
|
"\t{\n"
|
|
"\t\tLine(10);\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"void object::Line(float dist)\n"
|
|
"{\n"
|
|
"\tmove(dist);\n"
|
|
"\tturn(90);\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Square( )\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i++ )\n"
|
|
"\t{\n"
|
|
"\t\tLine(10);\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"void object::Line(float dist)\n"
|
|
"{\n"
|
|
"\tmove(dist);\n"
|
|
"\tturn(90);\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/false.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>false</code>"
|
|
msgstr "Typ <code>false</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/false.txt:2
|
|
#, no-wrap
|
|
msgid "This value means that a condition is not true; it is one of the two values that a <a cbot|bool>boolean</a> <a cbot|var>variable</a> can take."
|
|
msgstr "Dieser Wert bedeutet, dass die Bedingung nicht wahr ist. Dies ist einer der beiden Werte, die eine <a cbot|bool>boolsche</a> <a cbot|var>Variable</a> annehmen kann."
|
|
|
|
#. type: \b; header
|
|
#: ../E/file.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>file</code>"
|
|
msgstr "Typ <code>file</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/file.txt:2
|
|
#, no-wrap
|
|
msgid "This type is used for accessing files in the files/ folder."
|
|
msgstr "Dieser Typ wird benutzt, um auf Dateien im Ordner files/ zuzugreifen."
|
|
|
|
#. type: Source code
|
|
#: ../E/file.txt:4
|
|
#, no-wrap
|
|
msgid "\tfile handle();"
|
|
msgstr "\tfile handle();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/file.txt:6
|
|
#, no-wrap
|
|
msgid "Use the syntax above for declaring a file handle. You must use () to create an instance of the <code>file</code> class. Without the () the handle would have the value <code><a cbot|null>null</a></code>."
|
|
msgstr "Benutzen Sie diese Syntax, um eine Handle zu einer Datei zu erstellen. Sie müssen die Klammern () schreiben, damit eine Instanz der Klasse <code>file</code> erstellt wird. Ohne den Klammern würde die Variable den Wert <code><a cbot|null>null</a></code> enthalten."
|
|
|
|
#. type: Plain text
|
|
#: ../E/file.txt:8
|
|
#, no-wrap
|
|
msgid "Files can only be created and opened in the files/ folder which is located in the folder inside Colobot save directory. You cannot not create or open files elsewhere than in the files/ folder."
|
|
msgstr "Von Programmen in Colobot aus können nur Dateien im Ordner files/ erstellt werden, der sich im Ordner befindet, in dem Colobot installiert wurde. Auf Dateien in anderen Ordnern kann nicht zugegriffen werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/file.txt:11
|
|
#, no-wrap
|
|
msgid "<code>file</code> is actually not a simple type but a class. <code>open</code>, <code>close</code>, <code>writeln</code> etc. are methods of the <code>file</code> class. This is the reason why we always write <code>handle.method()</code>:"
|
|
msgstr "<code>file</code> ist kein einfacher Variablentyp, sondern eine Klasse. <code>open</code>, <code>close</code>, <code>writeln</code> usw. sind Methoden der Klasse <code>file</code>. Deshalb muss die Handle zur Datei dem Namen der Methode immer mit einem Punkt vorangehen (<code>handle.method()</code>):"
|
|
|
|
#. type: Source code
|
|
#: ../E/file.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"\thandle.open(\"test.txt\", \"w\");\n"
|
|
"\thandle.close();"
|
|
msgstr ""
|
|
"\thandle.open(\"test.txt\", \"w\");\n"
|
|
"\thandle.close();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/file.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> und <code><a cbot|eof>eof</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/fire.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>fire</code>"
|
|
msgstr "Anweisung <code>fire</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>fire();<n/> fires the bot's onboard cannon."
|
|
msgstr "Die Anweisung <c/>fire();<n/> feuert die Kanone des Roboters ab."
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:5
|
|
#, no-wrap
|
|
msgid "Generally this instruction is used to shoot one-second bursts:"
|
|
msgstr "Meistens wird diese Anweisung benutzt, um Salven von einer Sekunde abzufeuern:"
|
|
|
|
#. type: Source code
|
|
#: ../E/fire.txt:7
|
|
#, no-wrap
|
|
msgid "\tfire(1);"
|
|
msgstr "\tfire(1);"
|
|
|
|
#. type: Source code
|
|
#: ../E/fire.txt:11
|
|
#, no-wrap
|
|
msgid "<c/>fire ( time );<n/>"
|
|
msgstr "<c/>fire ( zeit );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:13
|
|
#, no-wrap
|
|
msgid "Fires the gun, with a burst that lasts a certain time. The longer the burst, the more energy it needs. This instruction can be used with the following bot types: "
|
|
msgstr "Feuert die Kanone des Roboters ab mit einer Salve von einer bestimmte Dauer. Je länger die Salve, desto mehr Energie wird verbraucht. Diese Anweisung kann mit folgenden Robotertypen ausgeführt werden:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:20
|
|
#, no-wrap
|
|
msgid "In order to move the gun upward or downward, use the instruction <code><a cbot|aim>aim</a></code>."
|
|
msgstr "Um die Kanone nach oben oder unten auszurichten, benutzen Sie den Befehl <code><a cbot|aim>aim</a></code>."
|
|
|
|
#. type: \t; header
|
|
#: ../E/fire.txt:22 ../E/wait.txt:15
|
|
#, no-wrap
|
|
msgid "time: <code><a cbot|float>float</a></code>"
|
|
msgstr "zeit: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:23
|
|
#, no-wrap
|
|
msgid "Duration of the burst. Generally, the value given is 1. Shorter bursts can also be performed in order to spare time and energy."
|
|
msgstr "Dauer der Salve. Meistens werden Salven von 1 Sekunde abgefeuert. Kürzere Salven können nützlich sein, um Zeit und Energie zu sparen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/fire.txt:26
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if OK, or a value different from zero if an error occurred.\n"
|
|
"<code>== 0 </code>the cannon has been fired\n"
|
|
"<code>!= 0 </code>error, the cannon could not be fired"
|
|
msgstr ""
|
|
"Null wenn OK, oder ein Wert verschieden von Null wenn ein Fehler aufgetreten ist.\n"
|
|
"<code>== 0 </code>Die Kanone wurde abgefeuert\n"
|
|
"<code>!= 0 </code>Fehler, die Kanone konnte nicht abgefeuert werden"
|
|
|
|
#. type: \b; header
|
|
#: ../E/flatgrnd.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>flatground</code>"
|
|
msgstr "Anweisung <code>flatground</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/flatgrnd.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>flatground ( center, rmax );<n/>"
|
|
msgstr "<c/>flatground ( zentrum, rmax );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatgrnd.txt:5
|
|
#, no-wrap
|
|
msgid "Calculates the maximal radius of a flat zone on which a building ca be built."
|
|
msgstr "Berechnet den maximalen Radius einer flachen Zone, auf der ein Gebäude gebaut werden kann."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatgrnd.txt:7 ../E/flatspace.txt:7
|
|
#, no-wrap
|
|
msgid "center: <code><a cbot|point>point</a></code>"
|
|
msgstr "zentrum: <code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatgrnd.txt:8
|
|
#, no-wrap
|
|
msgid "Center of the circlular zone."
|
|
msgstr "Zentrum der kreisförmigen Zone."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatgrnd.txt:10
|
|
#, no-wrap
|
|
msgid "rmax: <code><a cbot|float>float</a></code>"
|
|
msgstr "rmax: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatgrnd.txt:11
|
|
#, no-wrap
|
|
msgid "Maximal radius."
|
|
msgstr "Maximaler Radius."
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatgrnd.txt:14
|
|
#, no-wrap
|
|
msgid "Radius of the flat zone (always between 0 and rmax)."
|
|
msgstr "Radius der flachen Zone (Wert immer zwischen 0 und rmax)."
|
|
|
|
#. type: \b; header
|
|
#: ../E/float.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>float</code>"
|
|
msgstr "Typ <code>float</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/float.txt:2
|
|
#, no-wrap
|
|
msgid "Use this type for most variables that contains numbers. Variables of this type can contain positive and negative numbers, whole or real numbers, for example: "
|
|
msgstr "Benutzen Sie diesen Variablentyp für die meisten Variablen, die Zahlen enthalten sollen. Variablen von diesem Typ können positive und negative Zahlen enthalten, mit oder ohne Stellen hinter dem Komma, z.B.:"
|
|
|
|
#. type: Source code
|
|
#: ../E/float.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t12.9\n"
|
|
"\t1.125\n"
|
|
"\t0.002\n"
|
|
"\t-4.1"
|
|
msgstr ""
|
|
"\t12.9\n"
|
|
"\t1.125\n"
|
|
"\t0.002\n"
|
|
"\t-4.1"
|
|
|
|
#. type: Plain text
|
|
#: ../E/float.txt:9
|
|
#, no-wrap
|
|
msgid "If you need only whole numbers (f. ex. 12 or -5000), you should rather use the type <code><a cbot|int>int</a></code>."
|
|
msgstr "Wenn Sie eine Variable nur für ganze Zahlen brauchen (z.B. 12 oder -5000), sollten Sie besser eine Variable vom Typ <code><a cbot|int>int</a></code> benutzen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/float.txt:12
|
|
#, no-wrap
|
|
msgid "Do not insert space or colon characters into a number. To separate the whole part from the fractional part, use a dot. "
|
|
msgstr "Fügen Sie keine Leerstellen oder Kommas in die Zahlen ein. Um die Stellen vor dem Komma von den Stellen hinter dem Komma zu trennen, benutzen Sie einen Punkt."
|
|
|
|
#. type: Source code
|
|
#: ../E/float.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
" Write and not\n"
|
|
" 12.56 12 . 56\n"
|
|
" -54.34 -54,34\n"
|
|
"12895.69 12,895.69"
|
|
msgstr ""
|
|
" Schreiben Sie und nicht\n"
|
|
" 12.56 12 . 56\n"
|
|
" -54.34 -54,34\n"
|
|
"12895.69 12,895.69"
|
|
|
|
#. type: Plain text
|
|
#: ../E/float.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"Floating point numbers are represented in Colobot with 32 bits.\n"
|
|
"The highest value that can be represented is 3.4E+38.\n"
|
|
"The smallest value that can be represented is 3.4E-38."
|
|
msgstr ""
|
|
"Fliesskommazahlen werden in Colobot mit 32 Bits gespeichert, um die Rechengeschwindigkeit zu erhöhen.\n"
|
|
"Der höchste darstellbare Wert ist deshalb 3.4E+38.\n"
|
|
"Der kleinste Wert ist 3.4E-38."
|
|
|
|
#. type: \b; header
|
|
#: ../E/for.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>for</code>"
|
|
msgstr "Anweisung <code>for</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/for.txt:3
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>for ( before ; condition ; end )\n"
|
|
"{\n"
|
|
"\t<n/>Instructions ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>for ( vorher ; bedingung ; ende )\n"
|
|
"{\n"
|
|
"\t<n/>Anweisungen ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:8
|
|
#, no-wrap
|
|
msgid "This instruction allows you to execute a certain number of times the instructions contained in the <a cbot|bloc>block</a>."
|
|
msgstr "Mit dieser Anweisung können Sie die Anweisungen in dem <a cbot|bloc>Block</a> eine bestimmte Anzahl Male wiederholen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/for.txt:10
|
|
#, no-wrap
|
|
msgid "<code>before</code>"
|
|
msgstr "<code>vorher</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:14
|
|
#, no-wrap
|
|
msgid "This <a cbot|cond>condition</a> determines if another instance of the loop must be executed. It is tested before every instance of the loop. "
|
|
msgstr "Diese <a cbot|cond>Bedingung</a> bestimmt, ob die Schleife in weiteres Mal ausgeführt wird. Sie wird jedes Mal getestet, bevor die Schleife ausgeführt wird."
|
|
|
|
#. type: \t; header
|
|
#: ../E/for.txt:16
|
|
#, no-wrap
|
|
msgid "<code>end</code>"
|
|
msgstr "<code>ende</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/for.txt:21
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\tmessage(i) ;\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\tmessage(i) ;\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:25
|
|
#, no-wrap
|
|
msgid "The following example is strictly equivalent to a <code>for</code>-loop, but it uses the instruction <code><a cbot|while>while</a></code>:"
|
|
msgstr "Folgendes Beispiel ist einer <code>for</code>-Schleife gleichwertig, benutzt aber die Anweisung <code><a cbot|while>while</a></code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/for.txt:26
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>before;\n"
|
|
"while ( condition )\n"
|
|
"{\n"
|
|
"\t<n/>Instructions ...<c/>\n"
|
|
"\tend;\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>vorher;\n"
|
|
"while ( bedingung )\n"
|
|
"{\n"
|
|
"\t<n/>Anweisungen ...<c/>\n"
|
|
"\tende;\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:34
|
|
#, no-wrap
|
|
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>for ( )</code>."
|
|
msgstr "Am Ende der Zeile mit der <code>for ( )</code>-Anweisung darf kein Strichpunkt stehen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:36
|
|
#, no-wrap
|
|
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>for </code>."
|
|
msgstr "Die Anweisungen <code><a cbot|break>break</a></code> und <code><a cbot|continue>continue</a></code> können im Block einer \\c;for\\n;-Anweisung eingesetzt werden."
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:1
|
|
#, no-wrap
|
|
msgid "Functions"
|
|
msgstr "Funktionen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:118
|
|
#, no-wrap
|
|
msgid "You can also declare a function <a cbot|public>public</a> so it can be used by other bots."
|
|
msgstr "Sie können auch eine \"öffentliche\" Funktion mit dem Schlüsselwort <a cbot|public>public</a> deklarieren, so dass sie von anderen Robotern aus aufgerufen werden kann."
|
|
|
|
#. type: \b; header
|
|
#: ../E/goto.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>goto</code>"
|
|
msgstr "Anweisung <code>goto</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>goto();<n/> instructs the bot to reach a given position."
|
|
msgstr "Mit der Anweisung <c/>goto();<n/> wird dem Roboter der Befehl erteilt, eine bestimmte Position zu erreichen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:5
|
|
#, no-wrap
|
|
msgid "The most current use consists in moving the bot to an object located with the instruction <c/><a cbot|radar>radar</a>();<n/>. If the information returned by the <c/><a cbot|radar>radar</a>();<n/> has been stored in a certain variable, write the name of the variable followed by <code>.position</code> in order to get the position of the object. Here is an example of a program that looks for a <a object|titan>titanium cube</a>, goes to the position and grabs it:"
|
|
msgstr "Die häufigste Anwendung besteht darin, den Roboter anzuweisen, eine mit <c/><a cbot|radar>radar</a>();<n/> gefundene Position zu erreichen. Wenn die von der Anweisung <c/><a cbot|radar>radar</a>();<n/> zurückgegebenen Informationen in einer Variable gespeichert wurden, schreiben Sie den Namen der Variable gefolgt von <code>.position</code>, um die Position des Objekts zu erhalten. Hier ist ein Beispiel eines Programm, dass einen <a object|titan>Titanwürfel</a> sucht, die entsprechende Position erreicht, und den Würfel ergreift:"
|
|
|
|
#. type: Source code
|
|
#: ../E/goto.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = <a cbot|radar>radar</a>(Titanium);\n"
|
|
"\tgoto(item.position);\n"
|
|
"\t<a cbot|grab>grab</a>();"
|
|
msgstr ""
|
|
"\titem = <a cbot|radar>radar</a>(Titanium);\n"
|
|
"\tgoto(item.position);\n"
|
|
"\t<a cbot|grab>grab</a>();"
|
|
|
|
#. type: Source code
|
|
#: ../E/goto.txt:13
|
|
#, no-wrap
|
|
msgid "<c/>goto ( position, altitude, goal, crash );<n/>"
|
|
msgstr "<c/>goto ( position, flughöhe, ziel, crash );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:15
|
|
#, no-wrap
|
|
msgid "Tells the robot to go to the given position, avoiding all the obstacles if this is possible. "
|
|
msgstr "Weist den Roboter an, einen angegebene Position zu erreichen, indem alle Hindernisse umgangen werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:18
|
|
#, no-wrap
|
|
msgid "Coordinates of the goal position."
|
|
msgstr "Koordinaten der zu erreichenden Position."
|
|
|
|
#. type: \t; header
|
|
#: ../E/goto.txt:20
|
|
#, no-wrap
|
|
msgid "altitude: <code><a cbot|float>float</a></code>"
|
|
msgstr "flughöhe: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:21
|
|
#, no-wrap
|
|
msgid "Flight altitude for <a object|botgj>winged bots</a>. The altitude is useful only for <a object|botgj>winged bots</a>. From the initial altitude, the bot climbs higher until it reaches the specified hight. When arriving close to destination, it goes down to touch the ground at the given position. If no value is given, an altitude of 10 meters is the default value. On very short moves, even winged bot stay on the ground. For all bot except winged bots, this parameter is ignored. "
|
|
msgstr "Flughöhe für <a object|botgj>Roboter mit Jetantrieb</a>. Von der Starthöhe klettert der Roboter auf die angegebene Höhe über Grund, fliegt zur angegebenen Position, und geht auf Bodenhöhe nieder. Wenn kein Wert angegeben wird, wird 10 Meter Flughöhe als Standardwert ausgewählt. Auf sehr kurzen Strecken bleiben Roboter mit Jetantrieb auf dem Boden. Für alle Roboter ohne Jetantrieb wird dieser Parameter ignoriert."
|
|
|
|
#. type: \t; header
|
|
#: ../E/goto.txt:23
|
|
#, no-wrap
|
|
msgid "goal: <code><a cbot|int>int</a></code> (default value <code>0</code>)"
|
|
msgstr "ziel: <code><a cbot|int>int</a></code> (Standardwert <code>0</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"This parameter tells the bot how it must reach the goal: \n"
|
|
"<code>0</code> stops exactly at the goal position\n"
|
|
"<code>1</code> goes close to the goal position, without stopping.\n"
|
|
"If no value is given, <code>0</code> (precision) is the default value."
|
|
msgstr ""
|
|
"Dieser Parameter gibt an, wie der Roboter die angegebene Position erreichen muss: \n"
|
|
"<code>0</code> Hält genau an der angegebenen Position an.\n"
|
|
"<code>1</code> Erreicht ungefähr die Position, ohne anzuhalten.\n"
|
|
"Wenn kein Wert angegeben wird, ist <code>0</code> (Position genau erreichen) der Standardwert."
|
|
|
|
#. type: Plain text
|
|
#: ../E/goto.txt:30
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>goto()</code>.\n"
|
|
"<code>== 0 </code>Goal position reached\n"
|
|
"<code>!= 0 </code>Goal position impossible to reach"
|
|
msgstr ""
|
|
"Normalerweise hält das Programm bei einem Fehler (z.B. Position kann nicht erreicht werden) an. Sie können das Programm daran hindern, bei einem Fehler anzuhalten, indem Sie die Anweisung <code><a cbot|errmode>errmode</a>(0)</code> benutzen. In diesem Fall wird von der Anweisung <code>goto()</code> ein Wert verschieden von Null zurückgegeben, wenn ein Fehler aufgetreten ist:\n"
|
|
"<code>== 0 </code>Position wurde erreicht\n"
|
|
"<code>!= 0 </code>Position konnte nicht erreicht werden"
|
|
|
|
#. type: \b; header
|
|
#: ../E/grab.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>grab</code>"
|
|
msgstr "Anweisung <code>grab</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/grab.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>grab();<n/> instructs the bot to use the operating arm to grab an object located on the ground, on the platform of a building or on the power cell location of a bot."
|
|
msgstr "Der Befehl <c/>grab();<n/> weist den Roboter an, mit seinem Greifer einen Gegenstand aufzunehmen, sei es vom Boden, von der Basisplattform von verschiedenen Bauten oder von der Batterieladefläche eines Roboters."
|
|
|
|
#. type: Plain text
|
|
#: ../E/grab.txt:5
|
|
#, no-wrap
|
|
msgid "The instruction <c/>grab();<n/> written in this form grabs the object located in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further:"
|
|
msgstr "Der Befehl <c/>grab();<n/> in dieser Form ergreift den Gegenstand vor dem Roboter. Hier ist ein kurzes Programm, das einen Gegenstand vor dem Roboter ergreift und 5 Meter weiter wieder ablegt:"
|
|
|
|
#. type: Source code
|
|
#: ../E/grab.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tgrab();\n"
|
|
"\t<a cbot|move>move</a>(5);\n"
|
|
"\t<a cbot|drop>drop</a>();"
|
|
msgstr ""
|
|
"\tgrab();\n"
|
|
"\t<a cbot|move>move</a>(5);\n"
|
|
"\t<a cbot|drop>drop</a>();"
|
|
|
|
#. type: Source code
|
|
#: ../E/grab.txt:13
|
|
#, no-wrap
|
|
msgid "<c/>grab ( oper );<n/>"
|
|
msgstr "<c/>grab ( ort );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/grab.txt:15
|
|
#, no-wrap
|
|
msgid "This instruction appeals to the operating arm of a <a object|botgr>grabber bot</a>, in order to grab the closest object."
|
|
msgstr "Dieser Befehl weist einen <a object|botgr>Transporter</a> an, einen Gegenstand an einer bestimmten Stelle zu ergreifen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/grab.txt:18
|
|
#, no-wrap
|
|
msgid ""
|
|
"Oper indicates where the bot should look for an object to grab. If no indication is given, the object is picked up in front of the bot.\n"
|
|
"<code>InFront </code> Grabs in front (default value).\n"
|
|
"<code>Behind </code> Grabs behind.\n"
|
|
"<code>EnergyCell</code> Grabs the bot's own power cell."
|
|
msgstr ""
|
|
"Der Parameter <code>ort</code> gibt an, an welcher Stelle der Roboter den Gegenstand ergreifen soll. Wenn kein Parameter gegeben wird, wird ein Gegenstand vor dem Roboter ergriffen.\n"
|
|
"<code>InFront </code> ergreift einen Gegenstand vor dem Roboter (Standardwert).\n"
|
|
"<code>Behind </code> ergreift einen Gegenstand hinter dem Roboter.\n"
|
|
"<code>EnergyCell</code> ergreift die eigene Batterie."
|
|
|
|
#. type: Plain text
|
|
#: ../E/grab.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>grab();<n/>.\n"
|
|
"<code>== 0 </code>an object was grabbed\n"
|
|
"<code>!= 0 </code>error, no object was grabbed"
|
|
msgstr ""
|
|
"Normalerweise bewirkt ein Fehler, dass das Programm angehalten wird. Wenn Sie wollen, dass das Programm durch einen Fehler nicht angehalten wird, benutzen Sie den Befehl <code><a cbot|errmode>errmode</a>(0)</code>. In diesem Fall gibt der Befehl einen Wert verschieden von Null zurück, wenn beim Ausführen von <c/>grab();<n/> ein Fehler aufgetreten ist (z.B. kein Gegenstand in Reichweite).\n"
|
|
"<code>== 0 </code>ein Gegenstand wurde ergriffen\n"
|
|
"<code>!= 0 </code>Fehler, kein Gegenstand wurde ergriffen"
|
|
|
|
#. type: \b; header
|
|
#: ../E/if.txt:1
|
|
#, no-wrap
|
|
msgid "Instructions <code>if</code> and <code>else</code>"
|
|
msgstr "Anweisungen <code>if</code> und <code>else</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/if.txt:2
|
|
#, no-wrap
|
|
msgid "With the instruction <code>if() {}</code> you can execute a set of instructions only if a certain condition is true. Write the condition in brackets <code>()</code>, and the instructions in braces <code>{}</code>."
|
|
msgstr "Mit den Anweisungen <code>if</code> und <code>else</code> können Sie erreichen, dass bestimmte Anweisungen nur ausgeführt werden wenn eine <a cbot|cond>Bedingung</a> wahr ist. Schreiben Sie die <a cbot|cond>Bedingung</a> in Klammern <code>()</code>, und die betroffenen Anweisungen in geschwungenen Klammern <code>{}</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/if.txt:5
|
|
#, no-wrap
|
|
msgid "Here is a concrete example: The bot will shoot only if the target is closer than 40 meters:"
|
|
msgstr "Hier ist ein einfaches Beispiel: Der Roboter wird nur schießen, wenn die Zielscheibe näher als 40 Meter ist:"
|
|
|
|
#. type: Source code
|
|
#: ../E/if.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
|
"\tif (<a cbot|dist>distance</a>(position, item.position) < 40)\n"
|
|
"\t{\n"
|
|
"\t\tfire(1);\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
|
"\tif (<a cbot|dist>distance</a>(position, item.position) < 40)\n"
|
|
"\t{\n"
|
|
"\t\tfire(1);\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/if.txt:13
|
|
#, no-wrap
|
|
msgid "You can also test if an object exists at all. If the instruction <c/><a cbot|radar>radar</a>();<n/> does not find the requested object, it returns the value <code>null</code>. So you can test if an object does not exists with the condition <code>(item == null)</code>, or test if it exists with <code>(item != null)</code>. Two equal signs <code>==</code> test equality, an exclamation mark followed by an equal sign <code>!=</code> test inequality. Here is a test that will go to rechage the <a object|power>power cell</a> only if there is a <a object|station>power station</a>:"
|
|
msgstr "Sie können auch testen, ob es ein bestimmtes Objekt überhaupt gibt. Wenn die Anweisung <c/><a cbot|radar>radar</a>();<n/> den Gegenstand nicht findet, gibt sie den Wert <code>null</code> zurück. So können Sie testen ob ein Objekt nicht existiert mit <code>(item == null)</code>, oder testen ob es das Objekt gibt mit <code>(item != null)</code>. Zwei Gleichzeichen hintereinander <code>==</code> testen Gleichheit, ein Ausrufezeichen gefolgt von einem Gleichzeichen <code>!=</code> testet Ungleichheit. Hier ist ein Programm das die <a object|power>Batterie</a> nur auflädt, wenn es ein <a object|station>Kraftwerk</a> gibt:"
|
|
|
|
#. type: Source code
|
|
#: ../E/if.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = <a cbot|radar>radar</a>(PowerStation);\n"
|
|
"\tif (item != null)\n"
|
|
"\t{\n"
|
|
"\t\t<a cbot|goto>goto</a>(item.position);\n"
|
|
"\t\t<a cbot|wait>wait</a>(5);\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\titem = <a cbot|radar>radar</a>(PowerStation);\n"
|
|
"\tif (item != null)\n"
|
|
"\t{\n"
|
|
"\t\t<a cbot|goto>goto</a>(item.position);\n"
|
|
"\t\t<a cbot|wait>wait</a>(5);\n"
|
|
"\t}"
|
|
|
|
#. type: Source code
|
|
#: ../E/if.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>if ( condition )\n"
|
|
"{\n"
|
|
"\t</code>Instructions A ...<code>\n"
|
|
"}\n"
|
|
"else\n"
|
|
"{\n"
|
|
"\t</code>Instructions B ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<code>if ( bedingung )\n"
|
|
"{\n"
|
|
"\t</code>Anweisungen A ...<code>\n"
|
|
"}\n"
|
|
"else\n"
|
|
"{\n"
|
|
"\t</code>Anweisungen B ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/if.txt:33
|
|
#, no-wrap
|
|
msgid ""
|
|
"With this conditional structure you can execute a <a cbot|bloc>bloc</a> A or a <a cbot|bloc>bloc</a> B depending on a <a cbot|cond>condition</a>. If the condition is true, bloc A is executed. If the condition is false, bloc B is executed. \n"
|
|
"Part <code>else { }</code> is not compulsory. "
|
|
msgstr ""
|
|
"Mit dieser Anweisung wird je nach dem Ergebnis der <a cbot|cond>Bedingung</a> ein <a cbot|bloc>Block</a> A oder ein <a cbot|bloc>Block</a> B ausgeführt. Wenn die Bedingung falsch ist, wird Block B ausgeführt.\n"
|
|
"Der zweite Teil <code>else { }</code> kann auch weggelassen werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/if.txt:37
|
|
#, no-wrap
|
|
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>if ( )</code>."
|
|
msgstr "Setzen Sie keinen <a cbot|term>Strichpunkt</a> ans Ende der Zeile <code>if ( )</code>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/int.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>int</code>"
|
|
msgstr "Typ <code>int</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/int.txt:2
|
|
#, no-wrap
|
|
msgid "Use this type for variables that contain only whole numbers, negative or positive. For example: "
|
|
msgstr "Benutzen Sie diesen Typ für Variablen, die nur ganze positive oder negative Zahlen enthalten, z.B.: "
|
|
|
|
#. type: Source code
|
|
#: ../E/int.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t12\n"
|
|
"\t1000\n"
|
|
"\t-4"
|
|
msgstr ""
|
|
"\t12\n"
|
|
"\t1000\n"
|
|
"\t-4"
|
|
|
|
#. type: Plain text
|
|
#: ../E/int.txt:8
|
|
#, no-wrap
|
|
msgid "To represent real numbers like 12.05 or -0.005, use the type <code><a cbot|float>float</a></code>."
|
|
msgstr "Um Kommazahlen wie 12.05 oder -0.005 darzustellen, benutzen Sie den Typ <code><a cbot|float>float</a></code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/int.txt:11
|
|
#, no-wrap
|
|
msgid "Do not put space or colon signs inside a number. "
|
|
msgstr "Tippen Sie keine Leerstellen oder Kommas in einer Zahl."
|
|
|
|
#. type: Plain text
|
|
#: ../E/int.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"Numbers of the type <code>int</code> are represented with 32 bits.\n"
|
|
"The highest number that can be represented is (2^31)-1, that is 2'147'483'647.\n"
|
|
"The smallest number that can be represented is -(2^31), that is -2'147'483'648."
|
|
msgstr ""
|
|
"Zahlen vom Typ <code>int</code> werden mit 32 Bits dargestellt.\n"
|
|
"Die größte mögliche Zahl ist (2^31)-1, das ist 2'147'483'647.\n"
|
|
"Die kleinste mögliche Zahl ist -(2^31), das ist -2'147'483'648."
|
|
|
|
#. type: \b; header
|
|
#: ../E/jet.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>jet</code>"
|
|
msgstr "Anweisung <code>jet</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/jet.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>jet ( power );<n/>"
|
|
msgstr "<c/>jet ( power );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/jet.txt:5
|
|
#, no-wrap
|
|
msgid "Direct control of the jet of a <a object|botgj>winged bot</a>. The jet is what makes the bot fly. Use this instruction in order to take off, climb, descend or land."
|
|
msgstr "Direkte Kontrolle des Triebwerks von <a object|botgj>Jetrobotern</a>. Der Jetantrieb ermöglicht das Fliegen. Benutzen Sie diese Anweisung um abzuheben, die Flughöhe zu kontrollieren, und zu landen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/jet.txt:7 ../E/produce.txt:21
|
|
#, no-wrap
|
|
msgid "power: <code><a cbot|float>float</a></code>"
|
|
msgstr "power: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/jet.txt:8
|
|
#, no-wrap
|
|
msgid "Power of the jet, ranges between <code>-1</code> and <code>+1</code>. <c/>jet(1);<n/> instructs the bot to climb as fast as possible, <c/>jet(-1);<n/> descends as fast as possible, <c/>jet(0);<n/> stabilizes the altitude. In order to get slower altitude changes, use intermediate values, for example <c/>jet(0.3);<n/>."
|
|
msgstr "Leistung des Triebwerks, Wert zwischen <code>-1</code> und <code>+1</code>. <c/>jet(1);<n/> weist den Roboter an, so schnell wie möglich zu steigen, <c/>jet(-1);<n/> sinkt so schnell wie möglich, <c/>jet(0);<n/> stabilisiert die Flughöhe. Für langsamere Änderungen der Flughöhe benutzen Sie Zwischenwerte, z.B. <c/>jet(0.3);<n/>."
|
|
|
|
#. type: \t; header
|
|
#: ../E/jet.txt:11 ../E/message.txt:21 ../E/motor.txt:35 ../E/shield.txt:15 ../E/wait.txt:18
|
|
#, no-wrap
|
|
msgid "Return value: <code><a cbot|void>void</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|void>void</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/jet.txt:12 ../E/message.txt:22 ../E/motor.txt:36 ../E/shield.txt:16 ../E/wait.txt:19
|
|
#, no-wrap
|
|
msgid "None."
|
|
msgstr "Keine."
|
|
|
|
#. type: \b; header
|
|
#: ../E/message.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>message</code>"
|
|
msgstr "Anweisung <code>message</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/message.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>message ( text, type );<n/>"
|
|
msgstr "<c/>message ( text, typ );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/message.txt:5
|
|
#, no-wrap
|
|
msgid "Prints a message on top of the screen. After a few seconds, the message disappears automatically. "
|
|
msgstr "Zeigt eine Meldung oben am Bildschirm an. Nach ein paar Sekunden verschwindet die Nachricht automatisch."
|
|
|
|
#. type: \t; header
|
|
#: ../E/message.txt:7
|
|
#, no-wrap
|
|
msgid "text: <code><a cbot|string>string</a></code>"
|
|
msgstr "text: <code><a cbot|string>string</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/message.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"Text that is to be displayed. It is possible to append several texts and/or values with the operator <code>+</code>:\n"
|
|
"<c/>message(\"Not found\");<n/> \n"
|
|
"<c/>message(angle);<n/> \n"
|
|
"<c/>message(n + \" object(s) found\");<n/> \n"
|
|
"<c/>message(\"Distance = \" + dist + \" meters\");<n/> "
|
|
msgstr ""
|
|
"Anzuzeigender Text. Mehrere Texte (Strings) und/oder Zahlen können mit dem Operator <code>+</code> aneinandergehängt werden:\n"
|
|
"<c/>message(\"Nicht gefunden\");<n/> \n"
|
|
"<c/>message(winkel);<n/> \n"
|
|
"<c/>message(n + \" Objekte gefunden\");<n/> \n"
|
|
"<c/>message(\"Distanz = \" + dist + \" Meter\");<n/> "
|
|
|
|
#. type: \t; header
|
|
#: ../E/message.txt:14
|
|
#, no-wrap
|
|
msgid "type: <code><a cbot|int>int</a></code> (default value <code>DisplayMessage</code>)"
|
|
msgstr "typ: <code><a cbot|int>int</a></code> (Standardwert <code>DisplayMessage</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/message.txt:15
|
|
#, no-wrap
|
|
msgid "Type of the message, that determines the background color. "
|
|
msgstr "Typ der Meldung, der die Hintergrundfarbe bestimmt. "
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/message.txt:16
|
|
#, no-wrap
|
|
msgid "<code>DisplayMessage</code> Standard message on yellow background."
|
|
msgstr "<code>DisplayMessage</code> Standardmeldung auf gelbem Hintergrund."
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/message.txt:17
|
|
#, no-wrap
|
|
msgid "<code>DisplayInfo </code> Information on green background."
|
|
msgstr "<code>DisplayInfo </code> Information auf grünem Hintergrund."
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/message.txt:18
|
|
#, no-wrap
|
|
msgid "<code>DisplayWarning</code> Warning on blue background."
|
|
msgstr "<code>DisplayWarning</code> Warnung auf blauem Hintergrund."
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/message.txt:19
|
|
#, no-wrap
|
|
msgid "<code>DisplayError </code> Error on red background."
|
|
msgstr "<code>DisplayError </code> Fehlermeldung auf rotem Hintergrund."
|
|
|
|
#. type: \b; header
|
|
#: ../E/motor.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>motor</code>"
|
|
msgstr "Anweisung <code>motor</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>motor( , );<n/> sets the speed for the left-hand and the right-hand motor of the bot."
|
|
msgstr "Mit der Anweisung <c/>motor( , );<n/> können die Leistungen des rechten und des linken Motors eingestellt werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:5
|
|
#, no-wrap
|
|
msgid "The speed given to the motors will remain constant during the execution of the following instructions. Thanks to this characteristic it is possible to perform a rotation during the instruction <c/><a cbot|fire>fire</a>();<n/>. This will sweep a whole zone with only one burst. Here is an example that will sweep the zone in front of the bot:"
|
|
msgstr "Die Leistung der Motoren wird beibehalten, auch während die nächsten Anweisungen ausgeführt werden. Dank dieser Eigenschaft ist es möglich, während der Anweisung <c/><a cbot|fire>fire</a>();<n/> eine Drehung auszuführen. So wird mit einer Salve eine ganze Zone abgedeckt. Hier ist ein Programm, das ein 90-Grad-Zone vor dem Roboter abdeckt:"
|
|
|
|
#. type: Source code
|
|
#: ../E/motor.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t<a cbot|turn>turn</a>(45); // turns 45 degrees left\n"
|
|
"\tmotor(0.5, -0.5); // slow rotation to the right\n"
|
|
"\t<a cbot|fire>fire</a>(2); // fire\n"
|
|
"\tmotor(0,0); // stops the rotation"
|
|
msgstr ""
|
|
"\t<a cbot|turn>turn</a>(45); // Drehung 45 Grad links\n"
|
|
"\tmotor(0.5, -0.5); // langsame Drehung rechts\n"
|
|
"\t<a cbot|fire>fire</a>(2); // Feuer\n"
|
|
"\tmotor(0,0); // stoppt die Drehung"
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:12
|
|
#, no-wrap
|
|
msgid "With the left-hand motor turning half-speed forward and the right-hand motor turning half-speed backward, the bot will turn slowly on itself during the 2-second-burst."
|
|
msgstr "Da der linke Motor mit halber Kraft vorwärts dreht, und der rechte Motor mit halber Kraft rückwärts, wird der Roboter langsam um die eigene Achse drehen, während er eine 2-Sekunden-Salve abfeuert."
|
|
|
|
#. type: Source code
|
|
#: ../E/motor.txt:16
|
|
#, no-wrap
|
|
msgid "<c/>motor ( left, right );<n/>"
|
|
msgstr "<c/>motor ( links, rechts );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:18
|
|
#, no-wrap
|
|
msgid "Gives speed instructions to the right and left motors of the robot. The motors will keep this speed until a new motor instruction is performed, or until a <code><a cbot|move>move</a></code>, <code><a cbot|turn>turn</a></code> or <code><a cbot|goto>goto</a></code> instruction is performed."
|
|
msgstr "Stellt die Leistung des rechten und linken Motors ein. Die Motoren werden diese Leistung beibehalten, bis eine Anweisung <code><a cbot|move>move</a></code>, <code><a cbot|turn>turn</a></code> oder <code><a cbot|goto>goto</a></code> ausgeführt wird."
|
|
|
|
#. type: \t; header
|
|
#: ../E/motor.txt:20
|
|
#, no-wrap
|
|
msgid "left: <code><a cbot|float>float</a></code>"
|
|
msgstr "links: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:21
|
|
#, no-wrap
|
|
msgid "Speed instruction for the left motor; the value must range between -1 and 1. "
|
|
msgstr "Gewünschte Leistung des linken Motors. Der Wert muss zwischen -1 und 1 liegen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/motor.txt:23
|
|
#, no-wrap
|
|
msgid "right: <code><a cbot|float>float</a></code>"
|
|
msgstr "rechts: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:24
|
|
#, no-wrap
|
|
msgid "Speed instruction for the right motor; the value must range between -1 and 1. "
|
|
msgstr "Gewünschte Leistung des rechten Motors. Der Wert muss zwischen -1 und 1 liegen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:26
|
|
#, no-wrap
|
|
msgid ""
|
|
"Examples :\n"
|
|
"<c/>motor(1, 1);<n/> moves forward with highest possible speed.\n"
|
|
"<c/>motor(-0.5, -0.5);<n/> moves backward with half speed.\n"
|
|
"<c/>motor(1, -1);<n/> turns right as fast as possible. "
|
|
msgstr ""
|
|
"Beispiele:\n"
|
|
"<c/>motor(1, 1);<n/> volle Leistung voraus.\n"
|
|
"<c/>motor(-0.5, -0.5);<n/> halbe Leistung zurück.\n"
|
|
"<c/>motor(1, -1);<n/> dreht so schnell wie möglich nach rechts. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/motor.txt:31
|
|
#, no-wrap
|
|
msgid ""
|
|
"Note :\n"
|
|
"<c/>motor(2, 2);<n/> will not move forward any faster than <code>motor(1, 1)</code> \n"
|
|
"<c/>motor(-2, -2);<n/> will not move backward any faster than <code>motor(-1, -1)</code>"
|
|
msgstr ""
|
|
"Bemerkung:\n"
|
|
"<c/>motor(2, 2);<n/> fährt auch nicht schneller als <code>motor(1, 1)</code> "
|
|
|
|
#. type: \b; header
|
|
#: ../E/move.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>move</code>"
|
|
msgstr "Anweisung <code>move</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/move.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>move();<n/> instructs the bot to move forward or backward while keeping the same orientation. In brackets you must specify the length of the move in meters."
|
|
msgstr "Der Befehl <c/>move();<n/> weist den Roboter an, sich ohne Drehung um eine bestimmte Distanz vorwärts oder rückwärts zu bewegen. In Klammern geben Sie die gewünschte Länge an."
|
|
|
|
#. type: Plain text
|
|
#: ../E/move.txt:5
|
|
#, no-wrap
|
|
msgid "If you want the bot to move forward 30 meters, write <c/>move(30);<n/>. In order to move the bot backward after it dropped a chunk of <a object|titanore>titanium ore</a> on the <a object|convert>converter</a>, write <c/>move(-2.5);<n/>."
|
|
msgstr "Um den Roboter um 30 Meter nach vorne zu bewegen, schreiben Sie <c/>move(30);<n/>. Um den Roboter rückwärts zu bewegen, nachdem er einen Brocken <a object|titanore>Titanerz</a> auf dem <a object|convert>Konverter</a> abgeladen hat, schreiben Sie <c/>move(-2.5);<n/>."
|
|
|
|
#. type: Source code
|
|
#: ../E/move.txt:9
|
|
#, no-wrap
|
|
msgid "<c/>move ( length );<n/>"
|
|
msgstr "<c/>move ( länge );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/move.txt:11
|
|
#, no-wrap
|
|
msgid "Moves forward or backward of a given distance, always keeping the current orientation of the bot. "
|
|
msgstr "Weist den Roboter an, sich ohne Drehung um eine bestimmte Distanz vorwärts oder rückwärts zu bewegen. "
|
|
|
|
#. type: \t; header
|
|
#: ../E/move.txt:13
|
|
#, no-wrap
|
|
msgid "length: <code><a cbot|float>float</a></code>"
|
|
msgstr "länge: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/move.txt:14
|
|
#, no-wrap
|
|
msgid "Length of the move, in meters. A negative value makes the bot move backward. "
|
|
msgstr "Länge der Stecke in Metern. Ein negativer Wert entspricht einer Bewegung rückwärts. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/move.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>move()</code>.\n"
|
|
"<code>== 0 </code>Move executed\n"
|
|
"<code>!= 0 </code>error, the instruction was not performed correctly"
|
|
msgstr ""
|
|
"Normalerweise hält das Programm bei einem Fehler (z.B. Bewegung kann nicht durchgeführt werden) an. Sie können das Programm daran hindern, bei einem Fehler anzuhalten, indem Sie die Anweisung <code><a cbot|errmode>errmode</a>(0)</code> benutzen. In diesem Fall wird von der Anweisung <code>goto()</code> ein Wert verschieden von Null zurückgegeben, wenn ein Fehler aufgetreten ist:\n"
|
|
"<code>== 0 </code>Bewegung wurde durchgeführt\n"
|
|
"<code>!= 0 </code>Bewegung wurde nicht durchgeführt"
|
|
|
|
#. type: \b; header
|
|
#: ../E/nan.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>nan</code>"
|
|
msgstr "Wert <code>nan</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/nan.txt:2
|
|
#, no-wrap
|
|
msgid ""
|
|
"This special value indicates that a <a cbot|var>variable</a> of type <code><a cbot|int>int</a></code> or <code><a cbot|float>float</a></code> contains no number, but \"nothing\". \n"
|
|
"For example, if the instruction <code><a cbot|receive>receive</a></code> can not get the requested information, it returns <code>nan</code> :"
|
|
msgstr ""
|
|
"Dieser spezielle Wert gibt an, dass eine <a cbot|var>Variable</a> vom Typ <code><a cbot|int>int</a></code> oder <code><a cbot|float>float</a></code> nicht eine Zahl, sondern \"nichts\" enthält.\n"
|
|
"Wenn zum Beispiel die Anweisung <code><a cbot|receive>receive</a></code> nicht die erfragte Information erhalten kann, gibt sie <code>nan</code> zurück:"
|
|
|
|
#. type: Source code
|
|
#: ../E/nan.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tvalue = receive(\"Length\");\n"
|
|
"\tif ( value == nan ) // not found ?\n"
|
|
"\t{\n"
|
|
"\t\t\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tvalue = <a cbot|receive>receive</a>(\"Length\");\n"
|
|
"\t<a cbot|if>if</a> ( value == nan ) // nicht gefunden ?\n"
|
|
"\t{\n"
|
|
"\t\t\n"
|
|
"\t}"
|
|
|
|
#. type: \t; header
|
|
#: ../E/nan.txt:11
|
|
#, no-wrap
|
|
msgid "Dictionnary"
|
|
msgstr "Wörterbuch"
|
|
|
|
#. type: Plain text
|
|
#: ../E/nan.txt:12
|
|
#, no-wrap
|
|
msgid "<code>nan</code> = Not A Number "
|
|
msgstr "<code>nan</code> = Not A Number, auf Deutsch \"Nicht eine Zahl\""
|
|
|
|
#. type: \b; header
|
|
#: ../E/new.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>new</code> (for specialists)"
|
|
msgstr "Anweisung <code>new</code> (für Spezialisten)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/new.txt:2
|
|
#, no-wrap
|
|
msgid ""
|
|
"The <code>new</code> operator creates a <a cbot|class>class</a> instance:\n"
|
|
"<c/><s/>\tMyClass item; // now item is a null reference"
|
|
msgstr ""
|
|
"Der Operator <code>new</code> erstellt eine neue Instanz einer <a cbot|class>Klasse</a>:\n"
|
|
"<c/><s/>\tMyClass item; // item ist jetzt ein Null-Zeiger"
|
|
|
|
#. type: Source code
|
|
#: ../E/new.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = new MyClass(); // now item is a reference\n"
|
|
"\t // to a new class instance"
|
|
msgstr ""
|
|
"\titem = new MyClass(); // item ist jetzt ein Zeiger\n"
|
|
"\t // auf eine neue Instanz"
|
|
|
|
#. type: Plain text
|
|
#: ../E/new.txt:7
|
|
#, no-wrap
|
|
msgid "If you want to create a new instance at declaration time you can ommit the new <code>new</code> operator by putting () after the declaration:"
|
|
msgstr "Wenn Sie schon bei der Deklaration eine neue Instanz erstellen wollen, können Sie den Operator <code>new</code> weglassen, wenn Sie Klammern () hinter die Deklaration setzen:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/new.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"Instead of:\n"
|
|
"<c/><s/>\tMyClass item = new MyClass();\n"
|
|
"<n/>you can write:\n"
|
|
"<c/><s/>\tMyClass item();"
|
|
msgstr ""
|
|
"Anstatt:\n"
|
|
"<c/><s/>\tMyClass item = new MyClass();\n"
|
|
"<n/>schreiben Sie:\n"
|
|
"<c/><s/>\tMyClass item();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/new.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"If your class has a constructor with parameters you can write:\n"
|
|
"<c/><s/>\tMyClass item = new MyClass(2, 3);\n"
|
|
"<n/>or:\n"
|
|
"<c/><s/>\tMyClass item(2, 3);"
|
|
msgstr ""
|
|
"Wenn Ihre Klasse einen Konstruktor mit Parametern hat, können Sie schreiben:\n"
|
|
"<c/><s/>\tMyClass item = new MyClass(2, 3);\n"
|
|
"<n/>oder:\n"
|
|
"<c/><s/>\tMyClass item(2, 3);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/new.txt:21
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|pointer>reference</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|class>Klassen</a></code> und <code><a cbot|pointer>Zeiger</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/null.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>null</code>"
|
|
msgstr "Wert <code>null</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/null.txt:2
|
|
#, no-wrap
|
|
msgid "This special value indicates that the variable containing it does not reference an instance."
|
|
msgstr "Dieser spezielle Wert gibt an, dass eine Variable keinen Zeiger auf eine Instanz enthält."
|
|
|
|
#. type: Plain text
|
|
#: ../E/null.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"<a cbot|pointer>References</a>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|pointer>Zeiger</a>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/object.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>object</code>"
|
|
msgstr "Typ <code>object</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:21
|
|
#, no-wrap
|
|
msgid "<code>category</code>"
|
|
msgstr "<code>category</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:24
|
|
#, no-wrap
|
|
msgid "<code>position</code>"
|
|
msgstr "<code>position</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:25
|
|
#, no-wrap
|
|
msgid "Position of the object on the planet, in meters. The coordinates <code>x</code> and <code>y</code> correspond to the location on a map, the <code>z</code> coordinate corresponds to the altitude above (respectively below) sea level. "
|
|
msgstr "Position des Objekts auf dem Planeten, in Meter. Die <code>x-</code> und <code>y-</code>Koordinaten entsprechen der Position auf der Karte, die <code>z-</code>Koordinate entspricht der Höhe über (bzw. unter) Meeresspiegel. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:27
|
|
#, no-wrap
|
|
msgid "<code>orientation</code>"
|
|
msgstr "<code>orientation</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:28
|
|
#, no-wrap
|
|
msgid "Orientation of the object, in degrees. The orientation tells you what direction the object is facing. An orientation of <code>0</code> corresponds to an object facing eastwards, thus following the positive <code>x</code> axis. The orientation is measured counterclockwise. "
|
|
msgstr "Ausrichtung (Gierwinkel) des Objekts in Grad. Die Ausrichtung gibt an, wohin das Objekt schaut. Eine Ausrichtung <code>0</code> entspricht einem Objekt, das nach Osten schaut, also entlang der positiven <code>x-</code>Axe. Der Winkel wird im Gegenuhrzeigersinn gemessen. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:30
|
|
#, no-wrap
|
|
msgid "<code>pitch</code>"
|
|
msgstr "<code>pitch</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:31
|
|
#, no-wrap
|
|
msgid "Forward/backward angle of the robot. A pitch of <code>0</code> means that the bot is standing on flat ground. A positive inclination means that it is facing upwards, a negative inclination means that it is facing downwards. "
|
|
msgstr "Nickwinkel (Drehung nach vorne/hinten) des Roboters. Ein Nickwinkel <code>0</code> bedeutet, das der Roboter auf ebener Erde steht. Ein positiver Nickwinkel bedeutet, dass er nach oben schaut, ein negativer nach unten. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:33
|
|
#, no-wrap
|
|
msgid "<code>roll</code>"
|
|
msgstr "<code>roll</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:34
|
|
#, no-wrap
|
|
msgid "Left/right angle of the bot, in degrees. A positive value means that the bot is leaning to the left side, a negative value means that it is leaning to the right side. "
|
|
msgstr "Rollwinkel (Neigung nach rechts/links) des Roboters in Grad. Ein positiver Wert bedeutet eine Neigung auf die linke Seite, ein negativer Wert eine Neigung auf die rechte Seite. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:36
|
|
#, no-wrap
|
|
msgid "<code>energyLevel</code>"
|
|
msgstr "<code>energyLevel</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:37
|
|
#, no-wrap
|
|
msgid "Energy level, between 0 and 1. A normal <a object|power>power cell</a> that is fully charged returns the value <code>1</code>. A <a object|atomic>nuclear power cell</a> never returns a value higher than 1, it just lasts longer. Attention: The energy level of a bot is always zero, because the energy is not contained in the bot, but in the power cell. To know the energy level of the power cell of a bot, you must write <code>energyCell.energyLevel</code>. "
|
|
msgstr "Energievorrat, zwischen 0 und 1. Eine normale voll geladene <a object|power>elektrolytische Batterie</a> gibt den Wert <code>1</code> zurück. Eine <a object|fuelcell>Brennstoffzelle</a> gibt trotz der größeren Kapazität auch nie einen Wert über <code>1</code> zurück, der Wert sinkt jedoch langsamer. Achtung: der Energievorrat eines Roboters ist immer Null, da die Energie nicht im Roboter, sondern in der Batterie enthalten ist. Um den Vorrat in der Batterie eines Roboters zu erhalten, schreiben Sie <code>energyCell.energyLevel</code>. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:39
|
|
#, no-wrap
|
|
msgid "<code>shieldLevel</code>"
|
|
msgstr "<code>shieldLevel</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:40
|
|
#, no-wrap
|
|
msgid ""
|
|
"Shield level of a robot or building. A level <code>1</code> indicates that the shield is still perfect. Every time that the bot or building gets a bullet or collides with another object, the shield level decreases. When the level reaches <code>0</code>, the next bullet or collision will destroy the bot or building. \n"
|
|
"Bots can re-energize their shield on a <a object|repair>repair center</a>. The shield of a building is repaired if it lays inside the protection sphere of a <a object|botshld>shielder</a>."
|
|
msgstr ""
|
|
"Schaden am Roboter oder Gebäude. Der Wert <code>1</code> entspricht einem nicht beschädigten Gegenstand. Jedes Mal wenn der Roboter oder das Gebäude ein Geschoss abkriegt oder mit einem anderen Objekt kollidiert, sinkt der Wert. sobald der Wert <code>0</code> erreicht, wird der nächste Schadeneinfluss das Objekt zerstören.\n"
|
|
"Roboter können ihren Schaden auf einem <a object|repair>Reparaturzentrum</a> ausbessern lassen. Schäden an Gebäuden und auch Robotern können ausgebessert werden, wenn sie innerhalb der Sphäre eines aktiven <a object|botshld>Schutzschildroboters</a> liegen."
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:43
|
|
#, no-wrap
|
|
msgid "<code>temperature</code>"
|
|
msgstr "<code>temperature</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:44
|
|
#, no-wrap
|
|
msgid "Temperature of the jet of <a object|botgj>winged bots</a>. <code>0</code> corresponds to a cold jet. When used, the temperature increases progressively. When it reaches the value <code>1</code>, the jet is overheated and stops working, until it cooled down a little. "
|
|
msgstr "Triebwerktemperatur von <a object|botgj>Jetrobotern</a>. <code>0</code> entspricht einem kalten Triebwerk. Solange ein Triebwerk in Betrieb ist, steigt die Temperatur ständig. Wenn es den Wert <code>1</code> erreicht, ist es überhitzt und stellt den Betrieb ein, bis es abgekühlt ist."
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:46
|
|
#, no-wrap
|
|
msgid "<code>altitude</code>"
|
|
msgstr "<code>altitude</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:47
|
|
#, no-wrap
|
|
msgid "The <code>z</code> coordinate of the position indicates the altitude above sea level, whereas the <code>altitude</code> indicates the height above ground. This value is meaningful only for <a object|botgj>winged bots</a> and for <a object|wasp>wasps</a>. For all other objects, this value is zero. "
|
|
msgstr "Die <code>z-</code>Koordinate gibt die Höhe über Meeresspiegel an, während <code>altitude</code> die Höhe über Grund angibt. Dieser Wert ist nützlich für <a object|botgj>Jetroboter</a> und für <a object|wasp>Wespen</a>. Für alle anderen Objekte beträgt der Wert Null. "
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:49
|
|
#, no-wrap
|
|
msgid "<code>lifeTime</code>"
|
|
msgstr "<code>lifeTime</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:50
|
|
#, no-wrap
|
|
msgid "The age of the object in seconds since it's creation."
|
|
msgstr "Alter des Objekts in Sekunden seit seiner \"Geburt\"."
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:52
|
|
#, no-wrap
|
|
msgid "<code>energyCell</code>"
|
|
msgstr "<code>energyCell</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:53
|
|
#, no-wrap
|
|
msgid ""
|
|
"This information is special, because it returns the information about another object, in this case the power pack. This means that energyCell contains all the characteristics of a normal object, for example <code>category</code> (PowerCell or NuclearCell), <code>position</code> (the position of the cell), etc.\n"
|
|
"If you want to know the energy level of a robot, you must not check <code>energyLevel</code>, but <code>energyCell.energyLevel</code>.\n"
|
|
"If the bot has bot no power cell, <code>energyCell</code> returns <code>null</code>."
|
|
msgstr ""
|
|
"Diese Information ist besonders insofern, als es die Beschreibung eines anderen Gegenstands enthält, in diesem Fall die Batterie eines Roboters. Dies bedeutet, dass <code>energyCell</code> alle Eigenschaften eines normalen Gegenstands enthalten, z.B. <code>category</code> (<code>PowerCell</code> oder <code>FuelCell</code>), <code>position</code> (Position der Batterie), usw.\n"
|
|
"Wenn Sie den Energievorrat eines Roboters wissen wollen, müssen Sie nicht <code>energyLevel</code> testen, sondern <code>energyCell.energyLevel</code>.\n"
|
|
"Wenn der Roboter keine Batterie hat, gibt <code>energyCell</code> den Wert <code>null</code> zurück."
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:57
|
|
#, no-wrap
|
|
msgid "<code>load</code>"
|
|
msgstr "<code>load</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:58
|
|
#, no-wrap
|
|
msgid "This information also returns the description of a whole object: the description of the object carried by a <a object|botgr>grabber</a>. If it carries nothing, <code>load</code> returns <code>null</code>."
|
|
msgstr "Diese Information gibt ebenfalls die Beschreibung eines ganzen Gegenstands zurück, in diesem Fall des Objekts, das ein <a object|botgr>Greifer</a> trägt. Wenn er nichts trägt, gibt <code>load</code> den Wert <code>null</code> zurück."
|
|
|
|
#. type: \t; header, \b; header
|
|
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:170 ../E/expr.txt:187 ../E/object.txt:66
|
|
#, no-wrap
|
|
msgid "Examples"
|
|
msgstr "Beispiel"
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:67
|
|
#, no-wrap
|
|
msgid "The type <code>object</code> returns the special value <code><a cbot|null>null</a></code> when the object does not exist. For example:"
|
|
msgstr "Der Typ <code>object</code> gibt den speziellen Wert <code><a cbot|null>null</a></code> zurück, wenn das Objekt nicht existiert, z.B.:"
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:69
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tobject a;\n"
|
|
"\ta = radar(BotGrabberRoller);\n"
|
|
"\tif ( a == null ) // object does not exist ?\n"
|
|
"\t{\n"
|
|
"\t}\n"
|
|
"\tif ( a.position.z > 50 ) // is it on a mountain ?\n"
|
|
"\t{\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tobject a;\n"
|
|
"\ta = radar(BotGrabberRoller);\n"
|
|
"\tif ( a == null ) // existiert nicht ?\n"
|
|
"\t{\n"
|
|
"\t}\n"
|
|
"\tif ( a.position.z > 50 ) // ist es auf einem Hügel ?\n"
|
|
"\t{\n"
|
|
"\t}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/open.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>open</code>"
|
|
msgstr "Anweisung <code>open</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/open.txt:2
|
|
#, no-wrap
|
|
msgid "Open a text file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.open()</code>:"
|
|
msgstr "Öffnet eine Textdatei im Ordner <c/>\\files\\<n/>. Dies ist eine Methode der Klasse <code><a cbot|file>file</a></code>; schreiben Sie deshalb nicht <code>open()</code> sondern immer <code>handle.open()</code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/open.txt:4
|
|
#, no-wrap
|
|
msgid "\thandle.open(\"test.txt\", \"w\");"
|
|
msgstr "\thandle.open(\"test.txt\", \"w\");"
|
|
|
|
#. type: Plain text
|
|
#: ../E/open.txt:6
|
|
#, no-wrap
|
|
msgid "To open a file, proceed as follows:"
|
|
msgstr "Um eine Datei zu öffnen, gehen Sie wie folgt vor:"
|
|
|
|
#. type: Source code
|
|
#: ../E/open.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tfile handle();\n"
|
|
"\thandle.open(\"filename\", \"w\");\n"
|
|
"\thandle.writeln(\"abc\");\n"
|
|
"\thandle.close();"
|
|
msgstr ""
|
|
"\tfile handle();\n"
|
|
"\thandle.open(\"dateiname\", \"w\");\n"
|
|
"\thandle.writeln(\"abc\");\n"
|
|
"\thandle.close();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/open.txt:17
|
|
#, no-wrap
|
|
msgid "Files can only be created and opened in the files/ folder which is located in the folder inside Colobot save directory. You cannot not create or open files that are located elsewhere than in the files/ folder."
|
|
msgstr "Dateien können nur geöffnet werden, wenn sie sich im Ordner <c/>\\files\\<n/> befinden, der sich im Ordner befindet, in dem Colobot installiert wurde. Dateien in anderen Ordnern können mit diesem Befehl nicht geöffnet werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/open.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|file>file</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|file>Dateien</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> und <code><a cbot|eof>eof</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/openfile.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>openfile</code>"
|
|
msgstr "Anweisung <code>openfile</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/openfile.txt:4
|
|
#, no-wrap
|
|
msgid "file handle = openfile(\"filename\", \"r\");"
|
|
msgstr "file handle = openfile(\"dateiname\", \"r\");"
|
|
|
|
#. type: \b; header
|
|
#: ../E/point.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>point</code>"
|
|
msgstr "Typ <code>point</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:2
|
|
#, no-wrap
|
|
msgid ""
|
|
"Variables of this type contain the coordinates of a point in space. This type is made of three values that represent the <code>x</code>, <code>y</code> and <code>z</code> coordinates.\n"
|
|
"<code>x</code> and <code>y</code> correspond to the place on the ground. The positive <code>x</code> axis faces towards east, the positive <code>y</code> axis faces towards north. \n"
|
|
"The <code>z</code> value corresponds to the altitude above sea level. "
|
|
msgstr ""
|
|
"Variablen vom Typ <code>point</code> enthalten die Koordinaten eines Punktes im Raum. Dieser Typ besteht aus drei Variablen vom Typ <code><a cbot|float>float</a></code>, die respektive die <code>x-</code>, <code>y-</code> und <code>z-</code>Koordinaten enthalten.\n"
|
|
"<code>x</code> und <code>y</code> entsprechen der Position auf der Karte. Die positive <code>x-</code>Axe weist nach Osten, die positive <code>y-</code>Axe weist nach Norden. Die <code>z-</code>Koordinate entspricht der Höhe über Meeresspiegel."
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:6
|
|
#, no-wrap
|
|
msgid "If you want to declare a variable of type point, you can write: "
|
|
msgstr "Wenn Sie eine Variable vom Typ <code>point</code> deklarieren und definieren wollen, können Sie schreiben:"
|
|
|
|
#. type: Source code
|
|
#: ../E/point.txt:8
|
|
#, no-wrap
|
|
msgid "\tpoint a (10, 20, 30);"
|
|
msgstr "\tpoint a (10, 20, 30);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:10
|
|
#, no-wrap
|
|
msgid "You can also set the variable taking one value after another:"
|
|
msgstr "Sie können auch die verschiedenen Koordinaten eine nach der anderen definieren:"
|
|
|
|
#. type: Source code
|
|
#: ../E/point.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tpoint b;\n"
|
|
"\tb.x = 10;\n"
|
|
"\tb.y = 20;\n"
|
|
"\tb.z = 30;"
|
|
msgstr ""
|
|
"\tpoint b;\n"
|
|
"\tb.x = 10;\n"
|
|
"\tb.y = 20;\n"
|
|
"\tb.z = 30;"
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:17
|
|
#, no-wrap
|
|
msgid "With these examples, the following <a cbot|cond>condition</a> is true:"
|
|
msgstr "Mit diesem Beispiel ist folgende <a cbot|cond>Bedingung</a> wahr:"
|
|
|
|
#. type: Source code
|
|
#: ../E/point.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif ( a == b )\n"
|
|
"\t{\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tif ( a == b )\n"
|
|
"\t{\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"<n/> \n"
|
|
"The following declaration :"
|
|
msgstr ""
|
|
"<n/> \n"
|
|
"Die folgende Definition:"
|
|
|
|
#. type: Source code
|
|
#: ../E/point.txt:25
|
|
#, no-wrap
|
|
msgid "\tpoint c (4, 7);"
|
|
msgstr "\tpoint c (4, 7);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/point.txt:27
|
|
#, no-wrap
|
|
msgid "Is equivalent to :"
|
|
msgstr "ist gleichwertig mit:"
|
|
|
|
#. type: Source code
|
|
#: ../E/point.txt:29
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tpoint c;\n"
|
|
"\tc.x = 4;\n"
|
|
"\tc.y = 7;\n"
|
|
"\tc.z = 0;"
|
|
msgstr ""
|
|
"\tpoint c;\n"
|
|
"\tc.x = 4;\n"
|
|
"\tc.y = 7;\n"
|
|
"\tc.z = 0;"
|
|
|
|
#. type: \b; header
|
|
#: ../E/pointer.txt:1
|
|
#, no-wrap
|
|
msgid "References (for specialists)"
|
|
msgstr "Zeiger (für Spezialisten)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:2
|
|
#, no-wrap
|
|
msgid "CBOT uses references for <a cbot|class>classes</a> and <a cbot|array>arrays</a>. Any class variable actually contains a reference to the instance. The instance actually contains the class fields. Several references can reference the same instance. A <code><a cbot|null>null</a></code> reference references nothing. You can compare an instance to a suitcase and a reference to a carrier. Each time we need a new suitcase we create a new instance with a carrier. But a suitcase can be carried by more than one carrier. A carrier who carries no suitcase is a <code><a cbot|null>null</a></code> reference."
|
|
msgstr "CBOT benutzt Zeiger für <a cbot|class>Klassen</a> und <a cbot|array>Arrays</a>. Jede Klassenvariable enthält einen Zeiger zu einer Instanz der Klasse. Mehrere Zeiger können auf die gleiche Instanz weisen. Wenn eine Variable auf keine Instanz weist, enthält sie den Wert <code><a cbot|null>null</a></code>. Sie können Instanzen mit einem Koffer und einen Zeiger mit einem Träger vergleichen. Jedes Mal wenn wir einen neuen Koffer (Instanz) brauchen, brauchen wir einen neuen Träger (Zeiger). Ein Koffer kann jedoch von mehr als einem Träger getragen werden. Ein Träger ohne Koffer ist ein <code><a cbot|null>null</a></code>-Zeiger."
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"Example:\n"
|
|
"<c/><s/>{"
|
|
msgstr ""
|
|
"Beispiel:\n"
|
|
"<c/><s/>{"
|
|
|
|
#. type: Source code
|
|
#: ../E/pointer.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tMyClass item1(); // create a new instance\n"
|
|
"\t // referenced by item1\n"
|
|
"\tMyClass item2; // create a null reference\n"
|
|
"\titem2 = item1; // copy the reference,\n"
|
|
"\t // item2 and item1 now reference\n"
|
|
"\t // the same instance\n"
|
|
"\titem1.a = 12; // modifies the instance\n"
|
|
"\t // referenced by item1 (and item2)\n"
|
|
"\tmessage(item2.a);// displays 12\n"
|
|
"}"
|
|
msgstr ""
|
|
"\tMyClass item1(); // erstellt eine neue Instanz\n"
|
|
"\t // auf die von item1 verwiesen wird\n"
|
|
"\tMyClass item2; // erstellt einen null-Zeiger\n"
|
|
"\titem2 = item1; // kopiert den Zeiger,\n"
|
|
"\t // item2 und item1 weisen nun\n"
|
|
"\t // auf die gleiche Instanz\n"
|
|
"\titem1.a = 12; // verändert die Instanz, auf die\n"
|
|
"\t // item1 (und item2) zeigen\n"
|
|
"\tmessage(item2.a);// zeigt 12 an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:17
|
|
#, no-wrap
|
|
msgid "If you pass a <a cbot|class>class</a> instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been specified by the caller will be actuallay modified."
|
|
msgstr "Wenn Sie eine Instanz einer <a cbot|class>Klasse</a> als Parameter einer Funktion übergeben, erhält die Funktion nur einen Zeiger auf die Instanz. Wenn die Instanz also in der Funktion verändert wird, wird sie auch in der Funktion verändert, die die Instanz als Parameter übergeben hat."
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:19
|
|
#, no-wrap
|
|
msgid "<c/><s/>void Test( MyClass item )"
|
|
msgstr "<c/><s/>void Test( MyClass item )"
|
|
|
|
#. type: Source code
|
|
#: ../E/pointer.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\titem.a = 12; // modify the original instance\n"
|
|
"\titem = new MyClass(); // new local instance\n"
|
|
"\titem.a = 33; // modifie the local instance\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\titem.a = 12; // verändert die ursprüngliche Instanz\n"
|
|
"\titem = new MyClass(); // neue lokale Instanz\n"
|
|
"\titem.a = 33; // verändert die lokale Instanz\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:26
|
|
#, no-wrap
|
|
msgid ""
|
|
"Calling the fucntion <code>Test()</code>:\n"
|
|
"<c/><s/>{"
|
|
msgstr ""
|
|
"Ruft die Funktion <code>Test()</code>:\n"
|
|
"<c/><s/>{"
|
|
|
|
#. type: Source code
|
|
#: ../E/pointer.txt:28
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tMyClass toto();\n"
|
|
"\tTest(toto);\n"
|
|
"\tmessage(toto.a); // displays 12\n"
|
|
"}"
|
|
msgstr ""
|
|
"\tMyClass toto();\n"
|
|
"\tTest(toto);\n"
|
|
"\tmessage(toto.a); // zeigt 12 an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:33
|
|
#, no-wrap
|
|
msgid "The instance containing the field <code>a = 33</code> is referenced only by the newly created instance <code>item</code> inside the fucntion <code>Test</code>. At the end of <code>Test</code> this newly created instance referenced by <code>item</code> is automatically deleted."
|
|
msgstr "Nur die in der Funktion <code>Test</code> neu erstellte Instanz <code>item</code> enthält die Variable <code>a = 33</code>. Am Ende der Funktion <code>Test</code> wird diese neu erstellte Instanz automatisch gelöscht."
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:35
|
|
#, no-wrap
|
|
msgid ""
|
|
"A function can return an instance:\n"
|
|
"<c/><s/>MyClass Test2( )"
|
|
msgstr ""
|
|
"Eine Funktion kann auch eine Instanz zurückgeben:\n"
|
|
"<c/><s/>MyClass Test2( )"
|
|
|
|
#. type: Source code
|
|
#: ../E/pointer.txt:37
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\tMyClass item = new MyClass();\n"
|
|
"\titem.a = 33;\n"
|
|
"\treturn item;\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\tMyClass item = new MyClass();\n"
|
|
"\titem.a = 33;\n"
|
|
"\treturn item;\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:43
|
|
#, no-wrap
|
|
msgid ""
|
|
"Call the function like this:\n"
|
|
"<c/><s/>{"
|
|
msgstr ""
|
|
"Rufen Sie diese Funktion folgendermaßen auf:\n"
|
|
"<c/><s/>{"
|
|
|
|
#. type: Source code
|
|
#: ../E/pointer.txt:45
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tMyClass toto;\n"
|
|
"\ttoto = Test2(); // toto will contain a reference to\n"
|
|
"\t // the instance created by Test2()\n"
|
|
"\tmessage(toto.a); // displays 33\n"
|
|
"}"
|
|
msgstr ""
|
|
"\tMyClass toto;\n"
|
|
"\ttoto = Test2(); // toto enthält einen Zeiger auf die\n"
|
|
"\t // von Test2() erstellte Instanz\n"
|
|
"\tmessage(toto.a); // zeigt 33 an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/pointer.txt:52
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|new>new</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|class>Klassen</a></code>, <code><a cbot|new>new</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/private.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>private</code> (for specialists)"
|
|
msgstr "Anweisung <code>private</code> (für Spezialisten)"
|
|
|
|
#. type: Source code
|
|
#: ../E/private.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint b; // public by default\n"
|
|
"\tpublic int a; // also public \n"
|
|
"\tprivate point position; // private\n"
|
|
"}\n"
|
|
"void Test()\n"
|
|
"{\n"
|
|
"\tMyClass item;\n"
|
|
"\titem.a = item.b = 12; // ok\n"
|
|
"\tmessage( item.position ); // this is an error\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint b; // standardmäßig public\n"
|
|
"\tpublic int a; // auch public \n"
|
|
"\tprivate point position; // privat\n"
|
|
"}\n"
|
|
"void Test()\n"
|
|
"{\n"
|
|
"\tMyClass item;\n"
|
|
"\titem.a = item.b = 12; // OK\n"
|
|
"\tmessage( item.position ); // dies ist ein Fehler\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/public.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>public</code> (for specialists)"
|
|
msgstr "Anweisung <code>public</code> (für Spezialisten)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:2
|
|
#, no-wrap
|
|
msgid "This instruction has two distinct purposes:"
|
|
msgstr "Diese Anweisung dient zwei verschiedenen Zwecken:"
|
|
|
|
#. type: Bullet: '1)'
|
|
#: ../E/public.txt:4
|
|
#, no-wrap
|
|
msgid "Make a function available to other bots."
|
|
msgstr "Macht eine Funktion für andere Roboter verfügbar."
|
|
|
|
#. type: Bullet: '2)'
|
|
#: ../E/public.txt:5
|
|
#, no-wrap
|
|
msgid "Make a class member accessible from outside the class definition."
|
|
msgstr "Macht ein Klassenmitglied von außerhalb der Definition der Klasse sichtbar."
|
|
|
|
#. type: \b; header
|
|
#: ../E/public.txt:7
|
|
#, no-wrap
|
|
msgid "Instruction <code>public</code> for functions"
|
|
msgstr "Anweisung <code>public</code> für Funktionen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:8
|
|
#, no-wrap
|
|
msgid "If you put <code>public</code> before a <a cbot|function>function</a> definition, you can make the function available to programs in other bots in the same mission."
|
|
msgstr "Wenn Sie <code>public</code> vor der Deklaration einer <a cbot|function>Funktion</a> schreiben, können Sie die Funktion für Programme von anderen Robotern in der gleichen Mission verfügbar machen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:10
|
|
#, no-wrap
|
|
msgid "For example in the first bot we would have:"
|
|
msgstr "Im ersten Roboter könnten wir z.B. haben:"
|
|
|
|
#. type: Source code
|
|
#: ../E/public.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"public void object::Segment(float dist, float angle)\n"
|
|
"{\n"
|
|
"\tmove(dist);\n"
|
|
"\tturn(angle);\n"
|
|
"}"
|
|
msgstr ""
|
|
"public void object::Segment(float dist, float winkel)\n"
|
|
"{\n"
|
|
"\tmove(dist);\n"
|
|
"\tturn(winkel);\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:18
|
|
#, no-wrap
|
|
msgid "And in another bot we would have:"
|
|
msgstr "Und in einem anderen Roboter:"
|
|
|
|
#. type: Source code
|
|
#: ../E/public.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Square( )\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i++ )\n"
|
|
"\t{\n"
|
|
"\t\tSegment(10, 90);\n"
|
|
"\t\tfire(1);\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Square( )\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i++ )\n"
|
|
"\t{\n"
|
|
"\t\tSegment(10, 90);\n"
|
|
"\t\tFire(1);\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:29
|
|
#, no-wrap
|
|
msgid "If you have declared a function <code>public</code>, you cannot define a function with the same name and arguments in another bot of the same mission."
|
|
msgstr "Wenn Sie eine Funktion als <code>public</code> deklariert haben, können Sie keine andere Funktion mit demselben Namen und denselben Parametern in einem anderen Roboter in derselben Mission haben."
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:31
|
|
#, no-wrap
|
|
msgid "If a bot containing a <code>public</code> function is destroyed, the other bots that make use of this function will be stopped with an error."
|
|
msgstr "Wenn ein Roboter mit einer als <code>public</code> deklarierten Funktion zerstört wird, werden die anderen Roboter, die diese Funktion benützen, mit einer Fehlermeldung anhalten."
|
|
|
|
#. type: \b; header
|
|
#: ../E/public.txt:33
|
|
#, no-wrap
|
|
msgid "Instruction <code>public</code> for classes"
|
|
msgstr "Anweisung <code>public</code> für Variablen"
|
|
|
|
#. type: Source code
|
|
#: ../E/public.txt:36
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint b; // public by default\n"
|
|
"\tpublic int a; // also public \n"
|
|
"\tprivate point position; // privat\n"
|
|
"}\n"
|
|
"void Test()\n"
|
|
"{\n"
|
|
"\tMyClass item;\n"
|
|
"\titem.a = item.b = 12; // ok\n"
|
|
"\tmessage( item.position ); // this is an error\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint b; // standardmäßig public\n"
|
|
"\tpublic int a; // auch public \n"
|
|
"\tprivate point position; // privat\n"
|
|
"}\n"
|
|
"void Test()\n"
|
|
"{\n"
|
|
"\tMyClass item;\n"
|
|
"\titem.a = item.b = 12; // OK\n"
|
|
"\tmessage( item.position ); // dies ist ein Fehler\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/radar.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>radar</code>"
|
|
msgstr "Anweisung <code>radar</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:5
|
|
#, no-wrap
|
|
msgid "Write in brackets the <a cbot|category>name of the object</a> that you look for. Put the result in a variable of the <a cbot|type>type</a> <code>object</code>. Here is an example that looks for the closest ant:"
|
|
msgstr "Schreiben Sie in Klammern den <a cbot|category>Namen des Objekts</a>, das Sie suchen. Geben Sie das Ergebnis in eine Variable vom <a cbot|type>Typ</a> <code>object</code>. Hier ist ein Beispiel, das nach der nächsten Ameise sucht:"
|
|
|
|
#. type: Source code
|
|
#: ../E/radar.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"// At the beginning of the program:\n"
|
|
"object item; // variable declaration\n"
|
|
"\n"
|
|
"// Look for the closest ant\n"
|
|
"item = radar(AlienAnt);"
|
|
msgstr ""
|
|
"// Am Anfang des Programms:\n"
|
|
"object item; // Deklaration der Variable\n"
|
|
"\n"
|
|
"// sucht die nächste Ameise\n"
|
|
"item = radar(AlienAnt);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:17
|
|
#, no-wrap
|
|
msgid "Detects an object according to several parameters. "
|
|
msgstr "Sucht nach einem Objekt gemäss verschiedenen Parametern."
|
|
|
|
#. type: Image filename
|
|
#: ../E/radar.txt:19
|
|
#, no-wrap
|
|
msgid "radar1"
|
|
msgstr "radar1"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:20
|
|
#, no-wrap
|
|
msgid "Seen from above, the purple zone corresponds to the zone where objects will be detected. "
|
|
msgstr "Von oben gesehen, entspricht die lila Zone der Zone, wo nach dem Objekt gesucht wird. "
|
|
|
|
#. type: \t; header
|
|
#: ../E/produce.txt:15 ../E/search.txt:7
|
|
#, no-wrap
|
|
msgid "category: <code><a cbot|int>int</a></code>"
|
|
msgstr "kategorie: <code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:34
|
|
#, no-wrap
|
|
msgid ""
|
|
"Direction that the radar is facing, in degrees. \n"
|
|
"<code> 0</code> -> radar is facing straight ahead\n"
|
|
"<code>-90</code> -> radar is facing a quarter turn right\n"
|
|
"<code> 90</code> -> radar is facing a quarter turn left"
|
|
msgstr ""
|
|
"Richtung, in die das Radar gedreht werden soll, in Grad.\n"
|
|
"<code> 0</code> -> das Radar schaut geradeaus\n"
|
|
"<code>-90</code> -> das Radar schaut im rechten Winkel nach rechts\n"
|
|
"<code> 90</code> -> das Radar schaut im rechten Winkel nach links"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:40
|
|
#, no-wrap
|
|
msgid "Opening angle of the radar, in degrees. "
|
|
msgstr "Öffnungswinkel des Radars, in Grad."
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:43
|
|
#, no-wrap
|
|
msgid "Minimum detection distance, in meters. Objects that are closer than the minimum distance will not be detected. "
|
|
msgstr "Minimale Suchdistanz in Metern. Objekte, die näher als die minimale Distanz sind, werden nicht gefunden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:46
|
|
#, no-wrap
|
|
msgid "Maximum detection distance, in meters. Objects that are farther away than the maximum distance will not be detected. "
|
|
msgstr "Maximale Suchdistanz in Metern. Objekte, die ferner als die maximale Distanz sind, werden nicht gefunden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:49
|
|
#, no-wrap
|
|
msgid "Determines which way the objects are detected. With value <code>1</code>, returns the closest object found in the specified zone. With value <code>-1</code>, the farthest object in the zone will be returned. "
|
|
msgstr "Bestimmt, in welcher Richtung die Objekte gesucht werden sollen. Mit dem Wert <code>1</code> wird das nächste Objekt in der Suchzone zurückgegeben. Mit dem Wert <code>-1</code> wird das am weitesten entfernte Objekt in der Zone zurückgegeben."
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:65 ../E/retobj.txt:10 ../E/search.txt:22
|
|
#, no-wrap
|
|
msgid "Return value: <code><a cbot|object>object</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|object>object</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:66
|
|
#, no-wrap
|
|
msgid "Returns the first object found that corresponds to the specified category in the specified zone. If no object was found, returns the value <code><a cbot|null>null</a></code>."
|
|
msgstr "Gibt das erste Objekt zurück, das der gewünschten Kategorie in der angegebenen Zone entspricht. Wenn kein Objekt gefunden wurde, wird der Wert <code><a cbot|null>null</a></code> zurückgegeben."
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:69
|
|
#, no-wrap
|
|
msgid "You do not have to give all the parameters. Here are two examples of instructions that are equivalent: "
|
|
msgstr "Sie müssen nicht alle Parameter angeben. Hier sind zwei Beispiele, die jeweils gleichwertig sind:"
|
|
|
|
#. type: Source code
|
|
#: ../E/radar.txt:71
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tradar(Titanium, 0, 360, 0, 1000);\n"
|
|
"\tradar(Titanium); // equivalent"
|
|
msgstr ""
|
|
"\tradar(Titanium, 0, 360, 0, 1000);\n"
|
|
"\tradar(Titanium); // gleichwertig"
|
|
|
|
#. type: Source code
|
|
#: ../E/radar.txt:74
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tradar(Titanium, 0, 90, 0, 1000);\n"
|
|
"\tradar(Titanium, 0, 90); // equivalent"
|
|
msgstr ""
|
|
"\tradar(Titanium, 0, 90, 0, 1000);\n"
|
|
"\tradar(Titanium, 0, 90); // gleichwertig"
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:77
|
|
#, no-wrap
|
|
msgid ""
|
|
"When one or more parameters are not specified, the default values indicated above are used instead; only the first parameter is compulsory.\n"
|
|
"Generally, only the first parameter is specified: f. ex. <code>radar (AlienAnt)</code> detects the closest ant, wherever it may be. "
|
|
msgstr "Wenn ein oder mehrere Parameter nicht angegeben werden, wird der oben angegebene Standardwert stattdessen eingesetzt. Nur der erste Parameter ist obligatorisch, z.B. <code>radar(AlienAnt)</code> sucht nach der nächsten Ameise, wo immer sie sein mag."
|
|
|
|
#. type: \b; header
|
|
#: ../E/readln.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>readln</code>"
|
|
msgstr "Anweisung <code>readln</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/readln.txt:2
|
|
#, no-wrap
|
|
msgid "Read one line from an open file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.readln()</code>:"
|
|
msgstr "Liest eine Zeile von einer offenen Datei im Ordner <c/>\\files\\<n/>. Dies ist eine Methode der Klasse <code><a cbot|file>file</a></code>. Schreiben Sie deshalb immer <code>handle.readln()</code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/readln.txt:4
|
|
#, no-wrap
|
|
msgid "\ts = handle.readln();"
|
|
msgstr "\ts = handle.readln();"
|
|
|
|
#. type: Plain text
|
|
#: ../E/readln.txt:6
|
|
#, no-wrap
|
|
msgid "The file must have been opened for reading (<code>\"r\"</code>) with the <code><a cbot|open>open</a></code> instruction. <code>readln</code> returns the string containing the whole line but without the end of line characters 0x0D (CR) and 0x0A (LF)."
|
|
msgstr "Die Datei muss zuerst im Lesemodus (<code>\"r\"</code>) mit der Anweisung <code><a cbot|open>open</a></code> geöffnet werden. <code>readln</code> gibt einen String mit dem Inhalt der entsprechenden Zeile, aber ohne die Zeichen 0x0D (CR) und 0x0A (LF) zurück."
|
|
|
|
#. type: Source code
|
|
#: ../E/readln.txt:9
|
|
#, no-wrap
|
|
msgid "<c/>string = handle.readln ( );<n/>"
|
|
msgstr "<c/>string = handle.readln ( );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/readln.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tstring s;\n"
|
|
"\ts = handle.readln();\n"
|
|
"\tif ( s == \"abc\" )\n"
|
|
"\t..."
|
|
msgstr ""
|
|
"\tstring s;\n"
|
|
"\ts = handle.readln();\n"
|
|
"\tif ( s == \"abc\" )\n"
|
|
"\t..."
|
|
|
|
#. type: Plain text
|
|
#: ../E/readln.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|file>Dateien</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|writeln>writeln</a></code> und <code><a cbot|eof>eof</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/receive.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>receive</code>"
|
|
msgstr "Anweisung <code>receive</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/receive.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>receive ( name, power );<n/>"
|
|
msgstr "<c/>receive ( name, reichweite );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/receive.txt:5
|
|
#, no-wrap
|
|
msgid "Retrieves an information from the closest <a object|exchange>information exchange post</a>."
|
|
msgstr "Ruft eine Information vom nächsten <a object|exchange>Infoserver</a> ab."
|
|
|
|
#. type: Plain text
|
|
#: ../E/receive.txt:8
|
|
#, no-wrap
|
|
msgid "Name of the information required from the exchange post. This name is a string: it must be written in quotation marks \"\"."
|
|
msgstr "Name der Information, die vom Infoserver abgerufen werden soll. Dieser Name ist ein String (Zeichenkette), er muss also in Anführungszeichen \"\" geschrieben werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/receive.txt:11
|
|
#, no-wrap
|
|
msgid "Power of the receiver, which corresponds to maximal distance between the receiver and the exchange post. If the distance is longer, no information is received. Default value is 10 metres."
|
|
msgstr "Die Reichweite entspricht der maximalen Distanz zwischen dem Roboter und dem Infoserver, bei der die Übermittlung noch funktioniert. Wenn die Distanz länger ist, wird keine Information abgerufen. Der Standardwert ist 10 Meter."
|
|
|
|
#. type: Plain text
|
|
#: ../E/receive.txt:14
|
|
#, no-wrap
|
|
msgid "Value of the retrieved information. If no exchange post is close enough, or if the name of the requested information does not exist in the exchange post, the value <code>nan</code> is returned."
|
|
msgstr "Wert der abgerufenen Information. Wenn kein Infoserver in Reichweite ist, oder wenn keine Information mit dem angegebenen Namen im Infoserver gespeichert ist, wird der Wert <code><a cbot|nan>nan</a></code> zurückgegeben."
|
|
|
|
#. type: Plain text
|
|
#: ../E/receive.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|send>send</a></code>, <code><a cbot|testinfo>testinfo</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|send>send</a></code>, <code><a cbot|testinfo>testinfo</a></code> und <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/recycle.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>recycle</code>"
|
|
msgstr "Anweisung <code>recycle</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/recycle.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>recycle ( );<n/>"
|
|
msgstr "<c/>recycle ( );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/recycle.txt:5
|
|
#, no-wrap
|
|
msgid "Recycles the derelict bot in front of the <a object|botrecy>recycler</a> into a <a object|titan>titanium cube</a>."
|
|
msgstr "Recycelt das Roboterwrack vor dem <a object|botrecy>Recycler</a> in einen <a object|titan>Titanwürfel</a>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/recycle.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if OK, or a value different from zero if an error occurred.\n"
|
|
"<code>== 0 </code>the derelict bot has been recycled\n"
|
|
"<code>!= 0 </code>error, no derelict bot could be recycled"
|
|
msgstr ""
|
|
"Null wenn OK, oder ein Wert verschieden von Null wenn ein Fehler auftrat.\n"
|
|
"<code>== 0 </code>das Roboterwrack konnte recycelt werden.\n"
|
|
"<code>!= 0 </code>Fehler, das Recycling konnte nicht durchgeführt werden"
|
|
|
|
#. type: \b; header
|
|
#: ../E/retobj.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>retobject</code>"
|
|
msgstr "Anweisung <code>retobject</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/retobj.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>retobject ( number );<n/>"
|
|
msgstr "<c/>retobject ( nummer );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/retobj.txt:5
|
|
#, no-wrap
|
|
msgid "Returns the object corresponding to the given number."
|
|
msgstr "Gibt die Beschreibung des Objekts zurück, das der gegebenen Nummer entspricht."
|
|
|
|
#. type: \t; header
|
|
#: ../E/retobj.txt:7
|
|
#, no-wrap
|
|
msgid "number: <code><a cbot|int>int</a></code>"
|
|
msgstr "nummer: <code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/retobj.txt:8
|
|
#, no-wrap
|
|
msgid "Number of the object, between 0 and n. \"n\" represents the total number of objects in the scene. "
|
|
msgstr "Nummer des Objekts, zwischen 0 und n. n entspricht der gesamten Anzahl Objekte in der Mission. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/retobj.txt:11
|
|
#, no-wrap
|
|
msgid "Object corresponding to the number. The return value <code><a cbot|null>null</a></code> means that no object corresponds to this number, because the number was too high, and there are not so many objects in the scene. "
|
|
msgstr "Objekt, das der eingegebenen Nummer entspricht. Der Rückgabewert <code><a cbot|null>null</a></code> bedeutet, dass kein Objekt dieser Nummer entspricht, weil die Nummer zu hoch war, und es nicht so viele Objekte in der Mission gibt."
|
|
|
|
#. type: \b; header
|
|
#: ../E/return.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>return</code>"
|
|
msgstr "Anweisung <code>return</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/return.txt:2
|
|
#, no-wrap
|
|
msgid "Returns from a function. Syntax:"
|
|
msgstr ""
|
|
"Bestimmt den Wert, der von einer Funktion zurückgegeben wird. Bei einer Funktion, die nichts zurückgibt, schreiben Sie einfach <code>return</code>.\n"
|
|
"Syntax:"
|
|
|
|
#. type: Source code
|
|
#: ../E/return.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"void function ( )\n"
|
|
"{\n"
|
|
"\treturn;\n"
|
|
"}"
|
|
msgstr ""
|
|
"void function ( )\n"
|
|
"{\n"
|
|
"\treturn;\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/return.txt:10
|
|
#, no-wrap
|
|
msgid "If the <a cbot|function>function</a> has a return type, the <code>return</code> instruction must be followed by the value to be returned:"
|
|
msgstr "Wenn die <a cbot|function>Funktion</a> einen Wert zurückgibt, muss die Anweisung <code>return</code> vom Wert gefolgt werden, der zurückgegeben werden muss:"
|
|
|
|
#. type: Source code
|
|
#: ../E/return.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Pi ( )\n"
|
|
"{\n"
|
|
"\treturn 3.1415;\n"
|
|
"}"
|
|
msgstr ""
|
|
"float Pi ( )\n"
|
|
"{\n"
|
|
"\treturn 3.1415;\n"
|
|
"}"
|
|
|
|
#. type: Source code
|
|
#: ../E/return.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Mean (float a, float b)\n"
|
|
"{\n"
|
|
"\treturn (a+b)/2;\n"
|
|
"}"
|
|
msgstr ""
|
|
"float Mittel (float a, float b)\n"
|
|
"{\n"
|
|
"\treturn (a+b)/2;\n"
|
|
"}"
|
|
|
|
#. type: Source code
|
|
#: ../E/return.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"string Sign (float a)\n"
|
|
"{\n"
|
|
"\tif ( a > 0 ) return \"positive\";\n"
|
|
"\tif ( a < 0 ) return \"negative\";\n"
|
|
"\treturn \"null\";\n"
|
|
"}"
|
|
msgstr ""
|
|
"string Zeichen (float a)\n"
|
|
"{\n"
|
|
"\tif ( a > 0 ) return \"positiv\";\n"
|
|
"\tif ( a < 0 ) return \"negativ\";\n"
|
|
"\treturn \"Null\";\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/search.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>search</code>"
|
|
msgstr "Anweisung <code>search</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/search.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>search ( category, position );<n/>"
|
|
msgstr "<c/>search ( kategorie, position );<n/>"
|
|
|
|
#. type: \t; header
|
|
#: ../E/produce.txt:9 ../E/topo.txt:7
|
|
#, no-wrap
|
|
msgid "position: <code><a cbot|point>point</a></code>"
|
|
msgstr "position: <code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/search.txt:20
|
|
#, no-wrap
|
|
msgid "<code>search</code> returns the object of the given category that is closest to the position indicated here. "
|
|
msgstr "<code>search</code> gibt das Objekt zurück, das dieser Position am nächsten ist. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/search.txt:23
|
|
#, no-wrap
|
|
msgid "Characteristics of the object that has been found. The value <code><a cbot|null>null</a></code> means that no object of this category has been found. "
|
|
msgstr "Beschreibung des Objekts, das gefunden wurde. Wenn kein Objekt gefunden wurde, wird der Wert <code><a cbot|null>null</a></code> zurückgegeben."
|
|
|
|
#. type: \b; header
|
|
#: ../E/send.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>send</code>"
|
|
msgstr "Anweisung <code>send</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/send.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>send ( name, value, power );<n/>"
|
|
msgstr "<c/>send ( name, wert, reichweite );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/send.txt:5
|
|
#, no-wrap
|
|
msgid "Sends an information to the closest <a object|exchange>information exchange post</a>."
|
|
msgstr "Speichert eine Information im nächsten <a object|exchange>Infoserver</a>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/send.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"Name of the information to be sent to the exchange post. This name is a string: it must be written in quotation marks \"\".\n"
|
|
"If there is any information having this name, a new entry is created, as far as the total number of entries does not exceed 10. If there is already an information having this name, value is simply replaced by the new."
|
|
msgstr ""
|
|
"Name der Information die im Infoserver gespeichert werden soll. Dieser Name ist ein String (Zeichenkette), er muss also in Anführungszeichen \"\" geschrieben werden.\n"
|
|
"Wenn noch keine Information mit diesem Namen existiert, wird eine neue Information erstellt, solange die Anzahl an Informationen 10 nicht übersteigt. Wenn schon eine Information mit diesem Namen existiert, wird ihr Wert durch den neuen Wert ersetzt."
|
|
|
|
#. type: \t; header
|
|
#: ../E/send.txt:11
|
|
#, no-wrap
|
|
msgid "value: <code>float</code>"
|
|
msgstr "wert: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/send.txt:12
|
|
#, no-wrap
|
|
msgid "Value of the information to be sent."
|
|
msgstr "Wert der Information, die gespeichert werden soll."
|
|
|
|
#. type: Plain text
|
|
#: ../E/send.txt:15
|
|
#, no-wrap
|
|
msgid "Power of the transmitter, which corresponds to the maximal distance to where information can be the sent. Default value is 10 metres."
|
|
msgstr "Die Reichweite entspricht der maximalen Distanz zwischen dem Roboter und dem Infoserver, bei der die Übermittlung noch funktioniert. Wenn die Distanz länger ist, wird keine Information gespeichert. Der Standardwert ist 10 Meter."
|
|
|
|
#. type: Plain text
|
|
#: ../E/send.txt:18
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|testinfo>testinfo</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|testinfo>testinfo</a></code> und <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/shield.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>shield</code>"
|
|
msgstr "Anweisung <code>shield</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/shield.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>shield ( oper, radius );<n/>"
|
|
msgstr "<c/>shield ( oper, reichweite );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/shield.txt:5
|
|
#, no-wrap
|
|
msgid "Activates or deactivates the shield of the <a object|botshld>shielder</a>. You can of course move the shielder when the shield is active. It protects all objects that are inside the shielded sphere from enemy fire. The radius of the sphere can range between 10 and 25 meters."
|
|
msgstr "Aktiviert bzw. deaktiviert den Schild des <a object|botshld>Schutzschildroboters</a>. Der Roboter kann natürlich bewegt werden, wenn der Schild aktiv ist. Es schützt alle Objekte innerhalb der Reichweite vor Beschädigung und Zerstörung durch feindliches Feuer oder Kollisionen. Auch vorhergehende Schäden werden repariert. Der Schutzschild kann einen Radius von 10 bis 25 Meter aufweisen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/shield.txt:7
|
|
#, no-wrap
|
|
msgid "oper: <code><a cbot|float>float</a></code>"
|
|
msgstr "oper: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/shield.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>1</code> activates the shield.\n"
|
|
"<code>0</code> deactivates the shield\n"
|
|
"A normal <a object|power>power cell</a> fully charged can maintain the shield active during 20 seconds. When the cell is empty, the shield deactivates."
|
|
msgstr ""
|
|
"<code>1</code> aktiviert den Schild\n"
|
|
"<code>0</code> deaktiviert den Schild\n"
|
|
"Eine voll geladene <a object|power>elektrolytische Batterie</a> kann den Schutzschild während 20 Sekunden aufrecht erhalten. Wenn die Batterie leer ist, wird der Schild deaktiviert."
|
|
|
|
#. type: Plain text
|
|
#: ../E/shield.txt:13
|
|
#, no-wrap
|
|
msgid "Radius of the shield, ranging between 10 and 25 meters."
|
|
msgstr "Radius des Schildes, zwischen 10 und 25 Meter."
|
|
|
|
#. type: \b; header
|
|
#: ../E/sizeof.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>sizeof</code>"
|
|
msgstr "Anweisung <code>sizeof</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/sizeof.txt:2
|
|
#, no-wrap
|
|
msgid ""
|
|
"The sizeof function lets you know the number of elements contained in an <a cbot|array>array</a>.\n"
|
|
"That is the index of the last element plus one (\"empty\" elements are counted)."
|
|
msgstr "Mit der Anweisung <code>sizeof</code> können Sie herausfinden, wie viele Elemente in einem <a cbot|array>Array</a> enthalten sind. Die Anweisung gibt den Index des letzten Elements plus eins zurück (\"leere\" Elemente werden mitgezählt)."
|
|
|
|
#. type: Source code
|
|
#: ../E/sizeof.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\tint a[12];\n"
|
|
"\ta[5] = 345;\n"
|
|
"\tmessage( sizeof(a) ); // will display 6\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\tint a[12];\n"
|
|
"\ta[5] = 345;\n"
|
|
"\tmessage( sizeof(a) ); // zeigt 6 an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/sizeof.txt:11
|
|
#, no-wrap
|
|
msgid "In this example we have 6 elements in the array after <code>a[5]=345</code>. The non initialized elements <code>[0]</code>, <code>[1]</code>, <code>[2]</code>, <code>[3]</code> and <code>[4]</code> will be counted."
|
|
msgstr "Nach der Zeile <code>a[5]=345</code> wird das Array 6 Elemente enthalten. Die nicht initialisierten Elemente <code>[0]</code>, <code>[1]</code>, <code>[2]</code>, <code>[3]</code> und <code>[4]</code> werden mitgezählt."
|
|
|
|
#. type: Plain text
|
|
#: ../E/sizeof.txt:13
|
|
#, no-wrap
|
|
msgid "With multidimensionnal arrays you can get the size of a sub array:"
|
|
msgstr "Bei mehrdimensionalen Arrays können Sie die Größe von Unterarrays erhalten:"
|
|
|
|
#. type: Source code
|
|
#: ../E/sizeof.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"float xy[][]; // 2 dimensionnal array\n"
|
|
"xy[5][10] = 67;\n"
|
|
"message( sizeof(xy) ); // will display 6\n"
|
|
"message( sizeof(xy[5]) ); // will display 11\n"
|
|
msgstr ""
|
|
"float xy[][]; // 2-dimensionales Array\n"
|
|
"xy[5][10] = 67;\n"
|
|
"message( sizeof(xy) ); // zeigt 6 an\n"
|
|
"message( sizeof(xy[5]) ); // zeigt 11 an\n"
|
|
|
|
#. type: \b; header
|
|
#: ../E/sniff.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>sniff</code>"
|
|
msgstr "Anweisung <code>sniff</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/sniff.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>sniff ( );<n/>"
|
|
msgstr "<c/>sniff ( );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/sniff.txt:5
|
|
#, no-wrap
|
|
msgid "Sounds the underground in front of the <a object|botsr>sniffer</a>. According to what raw materials were detected, the following objects will be created: "
|
|
msgstr "Sondiert nach unterirdischen Bodenschätzen unter einem <a object|botsr>Schnüfflerroboter</a>. Je nachdem, welche Bodenschätze geortet wurden, wird folgende Markierung gelegt: "
|
|
|
|
#. type: Plain text
|
|
#: ../E/sniff.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>TitaniumSpot</code> -> <a object|stonspot>Red cross</a>\n"
|
|
"<code>UraniumSpot </code> -> <a object|uranspot>Yellow circle</a>\n"
|
|
"<code>PowerSpot </code> -> <a object|enerspot>Green cross</a>"
|
|
msgstr ""
|
|
"<code>TitaniumSpot</code> -> <a object|stonspot>rotes Kreuz</a>\n"
|
|
"<code>PlatinumSpot</code> -> <a object|platspot>gelber Kreis</a>\n"
|
|
"<code>PowerSpot </code> -> <a object|enerspot>grünes Kreuz</a>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/sniff.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if everything is OK, or a value different from zero if an error occurred. \n"
|
|
"<code>== 0 </code>sounding performed\n"
|
|
"<code>!= 0 </code>sounding impossible"
|
|
msgstr ""
|
|
"Null wenn alles OK, oder ein Wert verschieden von Null wenn ein Fehler auftrat. \n"
|
|
"<code>== 0 </code>Sondierung durchgeführt\n"
|
|
"<code>!= 0 </code>Sondierung unmöglich"
|
|
|
|
#. type: \b; header
|
|
#: ../E/space.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>space</code>"
|
|
msgstr "Anweisung <code>space</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/space.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>space ( center, rmin, rmax, dist );<n/>"
|
|
msgstr "<c/>space ( zentrum, rmin, rmax, dist );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/space.txt:5
|
|
#, no-wrap
|
|
msgid "Determines the position of the nearest free space around a given position."
|
|
msgstr "Bestimmt die Position der nächsten freien Fläche um eine angegebene Position."
|
|
|
|
#. type: \t; header
|
|
#: ../E/space.txt:7
|
|
#, no-wrap
|
|
msgid "center: <code><a cbot|point>point</a></code> (default: bot position)"
|
|
msgstr "zentrum: <code><a cbot|point>point</a></code> (Standard: Position des Roboters)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:8 ../E/space.txt:8
|
|
#, no-wrap
|
|
msgid "Desired position of the free space."
|
|
msgstr "Gewünschte Position der freien Fläche."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatspace.txt:13 ../E/space.txt:10
|
|
#, no-wrap
|
|
msgid "rmin: <code><a cbot|float>float</a></code> (default value: <code>8</code>)"
|
|
msgstr "rmin: <code><a cbot|float>float</a></code> (Standardwert: <code>8</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:14 ../E/space.txt:11
|
|
#, no-wrap
|
|
msgid "Minimum distance from the desired position."
|
|
msgstr "Minimale Distanz von der angegebenen Position."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatspace.txt:16 ../E/space.txt:13
|
|
#, no-wrap
|
|
msgid "rmax: <code><a cbot|float>float</a></code> (default value: <code>50</code>)"
|
|
msgstr "rmax: <code><a cbot|float>float</a></code> (Standardwert: <code>50</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:17 ../E/space.txt:14
|
|
#, no-wrap
|
|
msgid "Maximum distance from the desired position."
|
|
msgstr "Maximale Distanz von der angegebenen Position."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatspace.txt:19 ../E/space.txt:16
|
|
#, no-wrap
|
|
msgid "dist: <code><a cbot|float>float</a></code> (default value: <code>4</code>)"
|
|
msgstr "dist: <code><a cbot|float>float</a></code> (Standardwert: <code>4</code>)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:20 ../E/space.txt:17
|
|
#, no-wrap
|
|
msgid "Required distance between two free spaces."
|
|
msgstr "Gewünschte Distanz zwischen zwei freien Flächen."
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatspace.txt:22 ../E/space.txt:19
|
|
#, no-wrap
|
|
msgid "Return: <code><a cbot|point>point</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:23 ../E/space.txt:20
|
|
#, no-wrap
|
|
msgid "Position of the free space."
|
|
msgstr "Position der freien Fläche."
|
|
|
|
#. type: \b; header
|
|
#: ../E/static.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>static</code> (for specialists)"
|
|
msgstr "Anweisung <code>static</code> (für Spezialisten)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/static.txt:2
|
|
#, no-wrap
|
|
msgid "<a cbot|class>Class</a> members declared with <code>static</code> are shared between all instances of the class."
|
|
msgstr "Mit <code>static</code> deklarierte Mitglieder einer <a cbot|class>Klasse</a> werden von allen Instanzen der Klasse geteilt."
|
|
|
|
#. type: Source code
|
|
#: ../E/static.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tstatic int nb = 1;\n"
|
|
"\tstatic string [ ] list = null;\n"
|
|
"}\n"
|
|
"void Test ()\n"
|
|
"{\n"
|
|
"\tMyClasse item1();\n"
|
|
"\tMyClasse item2();\n"
|
|
"\titem1.nb = 3;\n"
|
|
"\titem1.list[item1.nb] = \"Hello\";\n"
|
|
"\tmessage( item2.list[item2.nb] ); // display \"Hello\"\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tstatic int nb = 1;\n"
|
|
"\tstatic string [ ] list = null;\n"
|
|
"}\n"
|
|
"void Test ()\n"
|
|
"{\n"
|
|
"\tMyClasse item1();\n"
|
|
"\tMyClasse item2();\n"
|
|
"\titem1.nb = 3;\n"
|
|
"\titem1.list[item1.nb] = \"Hello\";\n"
|
|
"\tmessage( item2.list[item2.nb] ); // zeigt \"Hello\" an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/static.txt:18
|
|
#, no-wrap
|
|
msgid "<code>Static</code> members can be declared <code><a cbot|private>private</a></code> so they will be only acessible from within class members (including constructors and destructors)."
|
|
msgstr "Mit <code>static</code> deklarierte Mitglieder können zusätzlich noch als <code><a cbot|private>private</a></code> deklariert werden, so dass sie nur Mitgliedern derselben Klasse zugänglich sind (einschliesslich Constructors und Destructors)."
|
|
|
|
#. type: Plain text
|
|
#: ../E/static.txt:21
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|synchro>synchronized</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|class>Klassen</a></code>, <code><a cbot|synchro>synchronized</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strfind.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strfind</code>"
|
|
msgstr "Anweisung <code>strfind</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strfind.txt:2
|
|
#, no-wrap
|
|
msgid "Find a substring in a string and returns the position of the first substring found or <a cbot|nan>nan</a> if the substring has not been found."
|
|
msgstr "Sucht einen String (Substring) innerhalb eines <a cbot|string>Strings</a>. Gibt die Position des ersten gefundenen Substrings zurück oder <code><a cbot|nan>nan</a></code> wenn der Substring nicht gefunden wurde."
|
|
|
|
#. type: Source code
|
|
#: ../E/strfind.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strfind ( string, sub );<n/>"
|
|
msgstr "<c/>strfind ( string, sub );<n/>"
|
|
|
|
#. type: \t; header
|
|
#: ../E/strfind.txt:7
|
|
#, no-wrap
|
|
msgid "string: <code><a cbot|string>string</a></code>"
|
|
msgstr "string: <code><a cbot|string>string</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strfind.txt:8
|
|
#, no-wrap
|
|
msgid "String we are searching in."
|
|
msgstr "String in dem gesucht werden soll."
|
|
|
|
#. type: \t; header
|
|
#: ../E/strfind.txt:10
|
|
#, no-wrap
|
|
msgid "sub: <code><a cbot|string>string</a></code>"
|
|
msgstr "sub: <code><a cbot|string>string</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strfind.txt:11
|
|
#, no-wrap
|
|
msgid "Substring we are searching for."
|
|
msgstr "Substring, nach dem gesucht werden soll."
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:35 ../E/strfind.txt:13 ../E/strleft.txt:10 ../E/strlen.txt:7 ../E/strlower.txt:7 ../E/strmid.txt:13 ../E/strright.txt:10 ../E/strupper.txt:7 ../E/strval.txt:4 ../E/strval.txt:11 ../E/writeln.txt:11
|
|
#, no-wrap
|
|
msgid "Examples:"
|
|
msgstr "Beispiele:"
|
|
|
|
#. type: Source code
|
|
#: ../E/strfind.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tint pos = strfind(\"abcdef\", \"ab\"); // pos will be 0\n"
|
|
"\tint pos = strfind(\"abcdef\", \"de\"); // pos will be 3\n"
|
|
"\tint pos = strfind(\"abcdef\", \"xy\"); // pos will be <a cbot|nan>nan</a>"
|
|
msgstr ""
|
|
"<c/>\tint pos = strfind(\"abcdef\", \"ab\"); // pos ist 0\n"
|
|
"\tint pos = strfind(\"abcdef\", \"de\"); // pos ist 3\n"
|
|
"\tint pos = strfind(\"abcdef\", \"xy\"); // pos ist <a cbot|nan>nan</a>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strfind.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/string.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>string</code>"
|
|
msgstr "Typ <code>string</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:2
|
|
#, no-wrap
|
|
msgid "Use a variable of this type for storing characters or strings."
|
|
msgstr "Benutzen Sie eine Variable vom Typ <code>string</code> um Zeichenketten (Texte) zu speichern. Im weiteren benutzen wir die englische Bezeichnung \"String\"."
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:4
|
|
#, no-wrap
|
|
msgid "For example: "
|
|
msgstr "Beispiele: "
|
|
|
|
#. type: Source code
|
|
#: ../E/string.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\t\"Hello!\"\n"
|
|
"\t\"This is a string\"\n"
|
|
"\t\"x\"\n"
|
|
"\t\"\" // empty string"
|
|
msgstr ""
|
|
"<c/>\t\"Hello!\"\n"
|
|
"\t\"Das ist ein String\"\n"
|
|
"\t\"x\"\n"
|
|
"\t\"\" // leerer String"
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:10
|
|
#, no-wrap
|
|
msgid "You can append two strings with the <code>+</code> operator :"
|
|
msgstr "Mit dem <code>+</code>-Operator können Sie zwei Zeichenketten aneinander hängen:"
|
|
|
|
#. type: Source code
|
|
#: ../E/string.txt:11
|
|
#, no-wrap
|
|
msgid "<c/>\t\"Good morning,\" + \" \" + \"Sir\""
|
|
msgstr "<c/>\t\"Good morning,\" + \" \" + \"Sir\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:13
|
|
#, no-wrap
|
|
msgid "Returns the string:"
|
|
msgstr "Ergibt den String:"
|
|
|
|
#. type: Source code
|
|
#: ../E/string.txt:14
|
|
#, no-wrap
|
|
msgid "<c/>\t\"Good morning, Sir\""
|
|
msgstr "<c/>\t\"Good morning, Sir\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:16
|
|
#, no-wrap
|
|
msgid "If you want to put a quotation mark (\") or a backslash (\\) in a string you must write:"
|
|
msgstr "Um ein Anführungszeichen (\") oder ein Backslash (\\) in einen String einzufügen, müssen diese Zeichen einem Backslash folgen:"
|
|
|
|
#. type: Source code
|
|
#: ../E/string.txt:17
|
|
#, no-wrap
|
|
msgid "<c/>\"This is \\\"very\\\" important\""
|
|
msgstr "<c/>\"Das ist \\\"sehr\\\" gut\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:18
|
|
#, no-wrap
|
|
msgid "<n/>which will result in the string <c/> This is \"very\" important."
|
|
msgstr "<n/>ergibt den String <c/>Das ist \"sehr\" gut."
|
|
|
|
#. type: Source code
|
|
#: ../E/string.txt:19
|
|
#, no-wrap
|
|
msgid "<c/>\"%user%\\\\ant.txt\""
|
|
msgstr "<c/>\"%user%\\\\ant.txt\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:20
|
|
#, no-wrap
|
|
msgid "<n/>will result in <c/>%user%\\ant.txt"
|
|
msgstr "<n/>ergibt den String <c/>%user%\\ant.txt"
|
|
|
|
#. type: Plain text
|
|
#: ../E/string.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"Following instructions can be used with strings:\n"
|
|
"<code><a cbot|strlen>strlen</a> </code>Get string length\n"
|
|
"<code><a cbot|strleft>strleft</a> </code>Extract left part\n"
|
|
"<code><a cbot|strright>strright</a> </code>Extract right part\n"
|
|
"<code><a cbot|strmid>strmid</a> </code>Extract center part\n"
|
|
"<code><a cbot|strfind>strfind</a> </code>Find a substring.\n"
|
|
"<code><a cbot|strval>strval</a> </code>Convert string to number\n"
|
|
"<code><a cbot|strupper>strupper</a> </code>Convert to upper case\n"
|
|
"<code><a cbot|strlower>strlower</a> </code>Convert to lower case"
|
|
msgstr ""
|
|
"Folgende Anweisungen können mit Strings benutzt werden:\n"
|
|
"<code><a cbot|strlen>strlen</a> </code>ergibt die Länge des Strings\n"
|
|
"<code><a cbot|strleft>strleft</a> </code>Extrahiert ein Teilstück links\n"
|
|
"<code><a cbot|strright>strright</a> </code>Extrahiert ein Teilstück rechts\n"
|
|
"<code><a cbot|strmid>strmid</a> </code>Extrahiert ein Teilstück in der Mitte\n"
|
|
"<code><a cbot|strfind>strfind</a> </code>Sucht einen Substring.\n"
|
|
"<code><a cbot|strval>strval</a> </code>Konvertiert einen String in eine Zahl\n"
|
|
"<code><a cbot|strupper>strupper</a> </code>Konvertiert zu Grossbuchstaben\n"
|
|
"<code><a cbot|strlower>strlower</a> </code>Konvertiert zu Kleinbuchstaben"
|
|
|
|
#. type: \b; header
|
|
#: ../E/strleft.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strleft</code>"
|
|
msgstr "Anweisung <code>strleft</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strleft.txt:2
|
|
#, no-wrap
|
|
msgid "Extracts the first (that is, leftmost) characters from a string."
|
|
msgstr "Extrahiert die ersten Zeichen (links) eines <a cbot|string>Strings</a>."
|
|
|
|
#. type: Source code
|
|
#: ../E/strleft.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strleft ( string, len );<n/>"
|
|
msgstr "<c/>strleft ( string, len );<n/>"
|
|
|
|
#. type: \t; header
|
|
#: ../E/strleft.txt:7 ../E/strmid.txt:10 ../E/strright.txt:7
|
|
#, no-wrap
|
|
msgid "len: <code><a cbot|int>int</a></code>"
|
|
msgstr "len: <code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strleft.txt:8 ../E/strmid.txt:11 ../E/strright.txt:8
|
|
#, no-wrap
|
|
msgid "Number of characters to be extracted."
|
|
msgstr "Anzahl Zeichen, die extrahiert werden sollen."
|
|
|
|
#. type: Source code
|
|
#: ../E/strleft.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tstring s = strleft(\"abcdef\", 2); // s is \"ab\"\n"
|
|
"\tstring s = strleft(\"abc\", 10); // s is \"abc\""
|
|
msgstr ""
|
|
"<c/>\tstring s = strleft(\"abcdef\", 2); // s ist \"ab\"\n"
|
|
"\tstring s = strleft(\"abc\", 10); // s ist \"abc\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/strleft.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strlen.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strlen</code>"
|
|
msgstr "Anweisung <code>strlen</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strlen.txt:2
|
|
#, no-wrap
|
|
msgid "Get the length of a string."
|
|
msgstr "Ergibt die Länge eines <a cbot|string>Strings</a>."
|
|
|
|
#. type: Source code
|
|
#: ../E/strlen.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strlen ( string );<n/>"
|
|
msgstr "<c/>strlen ( string );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/strlen.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tint len = strlen(\"abc\"); // len is 3\n"
|
|
"\tint len = strlen(\"\"); // len is 0\n"
|
|
"\tif ( strlen(s) == 0 ) // is string empty ?"
|
|
msgstr ""
|
|
"<c/>\tint len = strlen(\"abc\"); // len ist 3\n"
|
|
"\tint len = strlen(\"\"); // len is 0\n"
|
|
"\tif ( strlen(s) == 0 ) // Leerer Sting ?"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strlen.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strlower.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strlower</code>"
|
|
msgstr "Anweisung <code>strlower</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strlower.txt:2
|
|
#, no-wrap
|
|
msgid "Convert all characters in a string to lowercase."
|
|
msgstr "Konvertiert alle Zeichen eines <a cbot|string>Strings</a> in Kleinbuchstaben."
|
|
|
|
#. type: Source code
|
|
#: ../E/strlower.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strlower ( string );<n/>"
|
|
msgstr "<c/>strlower ( string );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/strlower.txt:8
|
|
#, no-wrap
|
|
msgid "<c/>\tstring s = strlower(\"Abc\"); // s is \"abc\""
|
|
msgstr "<c/>\tstring s = strlower(\"Abc\"); // s ist \"abc\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/strlower.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strmid.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strmid</code>"
|
|
msgstr "Anweisung <code>strmid</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strmid.txt:2
|
|
#, no-wrap
|
|
msgid "Extracts a substring of a given length starting at a given position from a string."
|
|
msgstr "Extrahiert ein Teilstück einer Zeichenkette (<a cbot|string>String</a>) mit einer gegebenen Länge und einer gegebenen Anfangsposition."
|
|
|
|
#. type: Source code
|
|
#: ../E/strmid.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strmid ( string, pos, len );<n/>"
|
|
msgstr "<c/>strmid ( string, pos, len );<n/>"
|
|
|
|
#. type: \t; header
|
|
#: ../E/strmid.txt:7
|
|
#, no-wrap
|
|
msgid "pos: <code><a cbot|int>int</a></code>"
|
|
msgstr "pos: <code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strmid.txt:8
|
|
#, no-wrap
|
|
msgid "The index of the first character that is to be included in the extracted substring."
|
|
msgstr "Index des ersten Zeichens, das extrahiert werden soll."
|
|
|
|
#. type: Source code
|
|
#: ../E/strmid.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tstring s = strmid(\"abcdef\", 1, 2); // s is \"bc\"\n"
|
|
"\tstring s = strmid(\"abcdef\", 4, 5); // s is \"ef\"\n"
|
|
"\tstring s = strmid(\"abcdef\", 9, 2); // s is \"\""
|
|
msgstr ""
|
|
"<c/>\tstring s = strmid(\"abcdef\", 1, 2); // s ist \"bc\"\n"
|
|
"\tstring s = strmid(\"abcdef\", 4, 5); // s ist \"ef\"\n"
|
|
"\tstring s = strmid(\"abcdef\", 9, 2); // s ist \"\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/strmid.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strright.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strright</code>"
|
|
msgstr "Anweisung <code>strright</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strright.txt:2
|
|
#, no-wrap
|
|
msgid "Extracts the last (that is, rightmost) characters from a string."
|
|
msgstr "Extrahiert die letzten Zeichen (rechts) von einem <a cbot|string>String</a>."
|
|
|
|
#. type: Source code
|
|
#: ../E/strright.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strright ( string, len );<n/>"
|
|
msgstr "<c/>strright ( string, len );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/strright.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tstring s = strright(\"abcdef\", 2); // s is \"ef\"\n"
|
|
"\tstring s = strright(\"abc\", 10); // s is \"abc\""
|
|
msgstr ""
|
|
"<c/>\tstring s = strright(\"abcdef\", 2); // s ist \"ef\"\n"
|
|
"\tstring s = strright(\"abc\", 10); // s ist \"abc\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/strright.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strupper.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strupper</code>"
|
|
msgstr "Anweisung <code>strupper</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strupper.txt:2
|
|
#, no-wrap
|
|
msgid "Convert all characters in a string to uppercase."
|
|
msgstr "Konvertiert alle Zeichen eines <a cbot|string>Strings</a> in Grossbuchstaben."
|
|
|
|
#. type: Source code
|
|
#: ../E/strupper.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>strupper ( string );<n/>"
|
|
msgstr "<c/>strupper ( string );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/strupper.txt:8
|
|
#, no-wrap
|
|
msgid "<c/>\tstring s = strupper(\"Abc\"); // s is \"ABC\""
|
|
msgstr "<c/>\tstring s = strupper(\"Abc\"); // s ist \"ABC\""
|
|
|
|
#. type: Plain text
|
|
#: ../E/strupper.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/strval.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>strval</code>"
|
|
msgstr "Anweisung <code>strval</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strval.txt:2
|
|
#, no-wrap
|
|
msgid "Convert a string to a number. Don't confuse the string <code>\"45\"</code> that contains actually the two characters <code>4</code> and <code>5</code> and the number <code>45</code>."
|
|
msgstr "Konvertiert einen <a cbot|string>String</a> in eine Zahl. Verwechseln Sie nicht den <a cbot|string>String</a> <code>\"45\"</code>, der die zwei Zeichen <code>4</code> und <code>5</code> enthält, mit der Zahl <code>45</code>."
|
|
|
|
#. type: Source code
|
|
#: ../E/strval.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tstring s = \"45\"+\"12\"; // s contains \"4512\"\n"
|
|
"\tfloat n = 45 + 12; // n contains 67"
|
|
msgstr ""
|
|
"<c/>\tstring s = \"45\"+\"12\"; // s enthält \"4512\"\n"
|
|
"\tfloat n = 45 + 12; // n enthält 67"
|
|
|
|
#. type: Source code
|
|
#: ../E/strval.txt:9
|
|
#, no-wrap
|
|
msgid "<c/>strval ( string );<n/>"
|
|
msgstr "<c/>strval ( string );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/strval.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tfloat n = strval(\"1.23\"); // n is 1.23\n"
|
|
"\tfloat n = strval(\"12abc45\"); // n is 12\n"
|
|
"\tfloat n = strval(\"abc\"); // n is 0\n"
|
|
"\tfloat n = strval(\"100\")+2; // n is 102"
|
|
msgstr ""
|
|
"<c/>\tfloat n = strval(\"1.23\"); // n ist 1.23\n"
|
|
"\tfloat n = strval(\"12abc45\"); // n ist 12\n"
|
|
"\tfloat n = strval(\"abc\"); // n ist 0\n"
|
|
"\tfloat n = strval(\"100\")+2; // n ist 102"
|
|
|
|
#. type: Plain text
|
|
#: ../E/strval.txt:18
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<a cbot|string>Strings</a>, <code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/synchro.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>synchronized</code> (for specialists)"
|
|
msgstr "Anweisung <code>synchronized</code> (für Spezialisten)"
|
|
|
|
#. type: Plain text
|
|
#: ../E/synchro.txt:2
|
|
#, no-wrap
|
|
msgid "A <a cbot|class>class</a> method can be declared <code>synchronized</code>. This is to make sure that the method is never being executed by more than one bot at the same time."
|
|
msgstr "Eine Methode einer <a cbot|class>Klasse</a> kann als <code>synchronized</code> deklariert werden. Damit wird sichergestellt, dass diese Methode nie von mehr als einem Roboter gleichzeitig ausgeführt wird."
|
|
|
|
#. type: Plain text
|
|
#: ../E/synchro.txt:4
|
|
#, no-wrap
|
|
msgid "The following example illustrates the problem:"
|
|
msgstr "Das folgende Beispiel veranschaulicht das Problem:"
|
|
|
|
#. type: Source code
|
|
#: ../E/synchro.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"class blocking\n"
|
|
"{\n"
|
|
"\tstatic int nb = 33;\n"
|
|
"\tsynchronized int inc( )\n"
|
|
"\t{\n"
|
|
"\t\tint val = nb;\n"
|
|
"\t\twait ( 2 ); // wait 2 sec.\n"
|
|
"\t\tnb = nb + 1;\n"
|
|
"\t\treturn val;\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"class blocking\n"
|
|
"{\n"
|
|
"\tstatic int nb = 33;\n"
|
|
"\tsynchronized int inc( )\n"
|
|
"\t{\n"
|
|
"\t\tint val = nb;\n"
|
|
"\t\twait ( 2 ); // wartet 2 Sek.\n"
|
|
"\t\tnb = nb + 1;\n"
|
|
"\t\treturn val;\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/synchro.txt:18
|
|
#, no-wrap
|
|
msgid ""
|
|
"What happens if two bots execute the <code>inc</code> method at the same time?\n"
|
|
"Both of them will execute <code>val=nb</code> and wait 2 seconds so both of them will have <code>val=33</code>. With <code>synchronized</code> the first bot starts execution with <code>val=33</code> and then waits 2 seconds and returns. Only once the first bot has returned from the <code>inc</code> method, the second bot will be allowed to enter the <code>inc</code> method and therefore the second bot will always have <code>val=34</code>."
|
|
msgstr ""
|
|
"Was passiert, wenn zwei Roboter gleichzeitig die Methode <code>inc</code> ausführen würden?\n"
|
|
"Beide Roboter werden die Anweisung <code>val=nb</code> ausführen und anschließend 2 Sekunden warten, beide werden also <code>val=33</code> haben. Mit <code>synchronized</code> wird der erste Roboter die Ausführung mit <code>val=33</code> beginnen, 2 Sekunden warten und den Wert von <code>nb</code> auf <code>34</code> setzen. Erst wenn der erste Roboter fertig ist, kann der zweite Roboter die Methode <code>inc</code> ausführen, diesmal mit dem Wert <code>val=34</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/synchro.txt:21
|
|
#, no-wrap
|
|
msgid "You can have more than one synchronized method in your <a cbot|class>class</a> in order to prevent simultaneous execution across more than one method. In other words: as long as a bot's program is inside a synchronized method, no other bot can enter any synchronized method of the same class."
|
|
msgstr "Sie können mehr als eine Methode einer <a cbot|class>Klasse</a> als <code>syncronized</code> deklarieren. Solange ein Roboter in einer dieser Methoden ist, kann kein anderer Roboter eine andere als <code>syncronized</code> deklarierte Methode derselben Klasse ausführen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/synchro.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|static>static</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|static>static</a></code>\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/term.txt:1
|
|
#, no-wrap
|
|
msgid "Semicolon"
|
|
msgstr "Strichpunkt"
|
|
|
|
#. type: Plain text
|
|
#: ../E/term.txt:2
|
|
#, no-wrap
|
|
msgid "Always use a semicolon <c/>;<n/> after a simple expression. For example: "
|
|
msgstr "Nach einer einfachen Anweisung oder einer Zuweisung muss immer ein Strichpunkt <c/>;<n/> stehen, zum Beispiel:"
|
|
|
|
#. type: Source code
|
|
#: ../E/term.txt:4
|
|
#, no-wrap
|
|
msgid "\tint counter = 0;"
|
|
msgstr "\tint counter = 0;\n"
|
|
|
|
#. type: Plain text
|
|
#: ../E/term.txt:6
|
|
#, no-wrap
|
|
msgid "However, after a <a cbot|bloc>bloc</a>, never put a semicolon:"
|
|
msgstr "Hinter einem <a cbot|bloc>Block</a> muss jedoch kein Strichpunkt stehen:"
|
|
|
|
#. type: Source code
|
|
#: ../E/term.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t{\n"
|
|
"\t\tfloat dist;\n"
|
|
"\t\tdist = distance(p1, p2);\n"
|
|
"\t} <n/>// no semicolon here!<c/>"
|
|
msgstr ""
|
|
"\t{\n"
|
|
"\t\tfloat dist;\n"
|
|
"\t\tdist = distance(p1, p2);\n"
|
|
"\t} <n/>// hier kein Strickpunkt!<c/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/term.txt:13
|
|
#, no-wrap
|
|
msgid "Do not use a semicolon either immediately after the instructions <code><a cbot|while>while</a></code>, <code><a cbot|if>if</a></code> or <code><a cbot|for>for</a></code>:"
|
|
msgstr "Setzen Sie keinen Strickpunkt unmittelbar hinter die Anweisungen <code><a cbot|while>while</a></code>, <code><a cbot|if>if</a></code> oder <code><a cbot|for>for</a></code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/term.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif ( a < b ) <n/>// no semicolon here!<c/>\n"
|
|
"\t{\n"
|
|
"\t\tb = 100-a;\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tif ( a < b ) <n/>// hier kein Strichpunkt!<c/>\n"
|
|
"\t{\n"
|
|
"\t\tb = 100-a;\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/term.txt:20
|
|
#, no-wrap
|
|
msgid "An instruction is always ended by a semicolon, and not by the end of the line. So you can very well put several instructions on the same line: "
|
|
msgstr "Eine Anweisung wird immer von einem Strichpunkt und nicht von einem Zeilensprung beendet. Sie können also mehrere Anweisungen auf einer Zeile schreiben:"
|
|
|
|
#. type: Source code
|
|
#: ../E/term.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tint d=20;\n"
|
|
"\tmove(d);\n"
|
|
"\tturn(90);"
|
|
msgstr ""
|
|
"\tint d=20;\n"
|
|
"\tmove(d);\n"
|
|
"\tturn(90);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/term.txt:26
|
|
#, no-wrap
|
|
msgid "Is equivalent to:"
|
|
msgstr "Ist gleichwertig mit:"
|
|
|
|
#. type: Source code
|
|
#: ../E/term.txt:28
|
|
#, no-wrap
|
|
msgid "\tint d=20; move(d); turn(90);"
|
|
msgstr "\tint d=20; move(d); turn(90);"
|
|
|
|
#. type: \b; header
|
|
#: ../E/testinfo.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>testinfo</code>"
|
|
msgstr "Anweisung <code>testinfo</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/testinfo.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>testinfo ( name, power );<n/>"
|
|
msgstr "<c/>testinfo ( name, reichweite );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/testinfo.txt:5
|
|
#, no-wrap
|
|
msgid "Tests if an information exists in the closest <a object|exchange>information exchange post</a>."
|
|
msgstr "Testet ob eine bestimmte Information im nächsten <a object|exchange>Infoserver</a> existiert."
|
|
|
|
#. type: Plain text
|
|
#: ../E/testinfo.txt:8
|
|
#, no-wrap
|
|
msgid "Name of the information to be tested in the exchange post. This name is a string: it must be written in quotation marks \"\"."
|
|
msgstr "Name der Information, deren Vorkommen getestet werden soll. Der Name ist ein String, er muss in Anführungszeichen \"\" geschrieben werden."
|
|
|
|
#. type: Plain text
|
|
#: ../E/testinfo.txt:11
|
|
#, no-wrap
|
|
msgid "Power of the transmitter, which corresponds to the maximal distance between the transmitter and the exchange post. If the distance is longer, the function returns <code>false</code>. Default value is 10 metres."
|
|
msgstr "Reichweite der Übertragung, die der maximalen Distanz zwischen dem Roboter und dem Infoserver entspricht. Wenn die Distanz größer ist, gibt die Anweisung sowieso <code>false</code> zurück. Der Standardwert ist 10Meter."
|
|
|
|
#. type: \t; header
|
|
#: ../E/testinfo.txt:13
|
|
#, no-wrap
|
|
msgid "Return: <code><a cbot|bool>bool</a></code>"
|
|
msgstr "Rückgabe: <code><a cbot|bool>bool</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/testinfo.txt:14
|
|
#, no-wrap
|
|
msgid "Return <code>true</code> if the information exists. Return and <code>false</code> if the information does not exist or if the receiver is too far away from the exchange post."
|
|
msgstr "Ergibt <code>true</code> wenn die Information existiert. Ergibt <code>false</code> wenn die Information nicht existiert oder wenn der Infoserver außer Reichweite ist."
|
|
|
|
#. type: Plain text
|
|
#: ../E/testinfo.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> und <code><a cbot|delinfo>deleteinfo</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: \b; header
|
|
#: ../E/this.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>this</code>"
|
|
msgstr "Anweisung <code>this</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/this.txt:2
|
|
#, no-wrap
|
|
msgid "Occasionally, a <a cbot|class>class</a> method needs to know the reference to the instance it is acting upon. For example the instance might want to pass it's own reference to another function. An implicit reference name <code>this</code> is available to methods and <code>this</code> is a reference to the current instance."
|
|
msgstr "Manchmal braucht eine Methode einer <a cbot|class>Klasse</a> eine Referenz auf die Instanz, an der sie gerade arbeitet, z.B. um sie an eine andere Funktion als Parameter zu übergeben. Benutzen Sie dafür die Anweisung <code>this</code>."
|
|
|
|
#. type: Source code
|
|
#: ../E/this.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint m_int;\n"
|
|
"\tstring m_str;\n"
|
|
"\tvoid MyFunction()\n"
|
|
"\t{\n"
|
|
"\t\tOtherFunction(this);\n"
|
|
"\t\tm_int = 2;\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"void OtherFunction(MyClass obj)\n"
|
|
"{\n"
|
|
"\tmessage(obj.m_str);\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tMyClass item();\n"
|
|
"\titem.m_str = \"Hello\";\n"
|
|
"\titem.MyFunction(); // display \"Hello\"\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint m_int;\n"
|
|
"\tstring m_str;\n"
|
|
"\tvoid MyFunction()\n"
|
|
"\t{\n"
|
|
"\t\tOtherFunction(this);\n"
|
|
"\t\tm_int = 2;\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"void OtherFunction(MyClass obj)\n"
|
|
"{\n"
|
|
"\tmessage(obj.m_str);\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tMyClass item();\n"
|
|
"\titem.m_str = \"Hello\";\n"
|
|
"\titem.MyFunction(); // zeigt \"Hello\" an\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/this.txt:27
|
|
#, no-wrap
|
|
msgid "You can also put <code>this</code> before a field name in a method but this is not necessary. In the example above in the method <code>MyFunction()</code> following two lines have strictly the same meaning:"
|
|
msgstr "Vor jede Variable der Klasse können Sie <code>this</code> schreiben, es ist jedoch nicht nötig und macht das Programm weniger gut lesbar. In der Methode <code>MyFunction()</code> im obigen Beispiel wären folgende zwei Zeilen gleichwertig:"
|
|
|
|
#. type: Source code
|
|
#: ../E/this.txt:29
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tm_int = 2;\n"
|
|
"\tthis.m_int = 2; // identical"
|
|
msgstr ""
|
|
"\tm_int = 2;\n"
|
|
"\tthis.m_int = 2; // gleichwertig"
|
|
|
|
#. type: Plain text
|
|
#: ../E/this.txt:32
|
|
#, no-wrap
|
|
msgid "In a method of the <code><a cbot|object>object</a></code> class, you can also use <code>this.</code> before a fieldname."
|
|
msgstr "In einer Methode der Klasse <code><a cbot|object>object</a></code> können Sie auch <code>this.</code> vor jede Instanzvariable setzen."
|
|
|
|
#. type: Source code
|
|
#: ../E/this.txt:34
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Display()\n"
|
|
"{\n"
|
|
"\tmessage(orientation);\n"
|
|
"\tmessage(this.orientation); // same thing but\n"
|
|
"\t // more explicit\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Display()\n"
|
|
"{\n"
|
|
"\tmessage(orientation);\n"
|
|
"\tmessage(this.orientation); // gleichwertig\n"
|
|
"\t // aber expliziter\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/this.txt:41
|
|
#, no-wrap
|
|
msgid "However if a field name is hidden by a parameter declaration or a variable declaration you must use <code>this</code>. In the following example the name <code>value</code> of the parameter is the same as the name of the field <code>value</code> of the <a cbot|class>class</a> <code>MyClass</code>, we must therefore write <code>this.value</code> in order to distinguish the field from the parameter."
|
|
msgstr "Wenn der Name einer Instanzvariable jedoch von einer lokalen Variable \"versteckt\" wird, muss <code>this</code> eingesetzt werden, um auf die Instanzvariable zuzugreifen. Im folgenden Beispiel ist der Name des Parameters <code>value</code> mit der Instanzvariable <code>value</code> der <a cbot|class>Klasse</a> <code>MyClass</code> identisch. Um auf die Instanzvariable zuzugreifen, muss also <code>this.value</code> geschrieben werden."
|
|
|
|
#. type: Source code
|
|
#: ../E/this.txt:43
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint value;\n"
|
|
"\tvoid Put( int value )\n"
|
|
"\t{\n"
|
|
"\t\tthis.value = value;\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint value;\n"
|
|
"\tvoid Put( int value )\n"
|
|
"\t{\n"
|
|
"\t\tthis.value = value;\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/thump.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>thump</code>"
|
|
msgstr "Anweisung <code>thump</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/thump.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>thump ( );<n/>"
|
|
msgstr "<c/>thump ( );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/thump.txt:5
|
|
#, no-wrap
|
|
msgid "Activates the weapon system of the <a object|bottump>thumper</a>, that turns ants and spiders belly up and makes them completely harmless for a while."
|
|
msgstr "Aktiviert das Waffensystem der <a object|bottump>Stampfer</a>, das alle Ameisen und Spinnen in weitem Umkreis auf den Rücken legt und so eine Zeit lang kampfunfähig macht."
|
|
|
|
#. type: Plain text
|
|
#: ../E/thump.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if everything is OK, a value different from zero if an error occurred. \n"
|
|
"<code>== 0 </code>Thumping performed\n"
|
|
"<code>!= 0 </code>Operation impossible"
|
|
msgstr ""
|
|
"Null wenn alles in Ordnung, ein Wert verschieden von Null wenn ein Fehler auftrat. \n"
|
|
"<code>== 0 </code>Stampfen ausgeführt\n"
|
|
"<code>!= 0 </code>Vorgang unmöglich"
|
|
|
|
#. type: \b; header
|
|
#: ../E/topo.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>topo</code>"
|
|
msgstr "Anweisung <code>topo</code>"
|
|
|
|
#. type: Source code
|
|
#: ../E/topo.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>topo ( position );<n/>"
|
|
msgstr "<c/>topo ( position );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/topo.txt:5
|
|
#, no-wrap
|
|
msgid "Returns the altitude of the ground at a give position. The altitude zero corresponds to sea level. A negative value indicates that at this position ground is covered with water. "
|
|
msgstr "Gibt die Bodenhöhe über Meer an der angegebenen Position zurück. Die Höhe Null entspricht dem Meeresspiegel. Ein negativer Wert gibt an, dass der Boden an dieser Stelle von Wasser bedeckt ist. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/topo.txt:8
|
|
#, no-wrap
|
|
msgid "Coordinates of the position whose altitude you want to know. "
|
|
msgstr "Koordinaten der Stelle, deren Höhe Sie wissen möchten."
|
|
|
|
#. type: Plain text
|
|
#: ../E/topo.txt:11
|
|
#, no-wrap
|
|
msgid "Altitude of the ground at the given position."
|
|
msgstr "Höhe über Meer an der angegebenen Stelle."
|
|
|
|
#. type: \b; header
|
|
#: ../E/true.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>true</code>"
|
|
msgstr "Wert <code>true</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/true.txt:2
|
|
#, no-wrap
|
|
msgid "This value means that a condition is true; it is one of the two values that a <a cbot|bool>boolean</a> <a cbot|var>variable</a> can take."
|
|
msgstr "Dieser Wert bedeutet, dass eine Bedingung wahr ist. Dies ist einer von zwei Werten, die eine <a cbot|bool>boolsche</a> <a cbot|var>Variable</a> annehmen kann."
|
|
|
|
#. type: \b; header
|
|
#: ../E/turn.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>turn</code>"
|
|
msgstr "Anweisung <code>turn</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:2
|
|
#, no-wrap
|
|
msgid "Use the instruction <c/>turn();<n/> to instruct the bot to perform a rotation on itself of a certain number of degrees."
|
|
msgstr "Der Befehl <c/>turn();<n/> weist den Roboter an, eine Drehung um die eigene Achse von einer bestimmten Anzahl Grad durchzuführen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:5
|
|
#, no-wrap
|
|
msgid "90 degreed means a quarter turn, 180 degrees means a half turn. A positive angle will perform a counterclockwise rotation, a negative angle means a clockwise rotation. Here are some examples with <c/>turn();<n/>:"
|
|
msgstr "Ein Drehung um 90 Grad ist eine Vierteldrehung, 180 Grad sind eine halbe Drehung. Ein positiver Winkel bedeutet eine Drehung im Gegenuhrzeigersinn, ein negativer Winkel eine Drehung im Uhrzeigersinn. Hier sind einige Beispiele mit <c/>turn();<n/>:"
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>turn(90);<n/> quarter turn to the left\n"
|
|
"<c/>turn(-90);<n/> quarter turn to the right (negative angle)\n"
|
|
"<c/>turn(180);<n/> half turn"
|
|
msgstr ""
|
|
"<c/>turn(90);<n/> Vierteldrehung nach links\n"
|
|
"<c/>turn(-90);<n/> Vierteldrehung nach rechts (negativer Winkel).\n"
|
|
"<c/>turn(180);<n/> halbe Drehung"
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:11
|
|
#, no-wrap
|
|
msgid "In order to turn the bot towards an object found with the instruction <c/><a cbot|radar>radar</a>();<n/>, you must calculate the rotation angle with the instruction <code><a cbot|direct>direction</a>()</code>:"
|
|
msgstr "Um einen Roboter in die Richtung eines mit <c/><a cbot|radar>radar</a>();<n/> gefundenen Objekts zu drehen, muss der Winkel mit der Anweisung <code><a cbot|direct>direction</a>()</code> berechnet werden:"
|
|
|
|
#. type: Source code
|
|
#: ../E/turn.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
|
|
"\tturn(<a cbot|direct>direction</a>(item.position));"
|
|
msgstr ""
|
|
"\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
|
|
"\tturn(<a cbot|direct>direction</a>(item.position));"
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:16
|
|
#, no-wrap
|
|
msgid "After these lines, just fire the cannon, and there is one hostile element less."
|
|
msgstr "Feuern Sie die Kanone nach diesen Zeilen ab, und schon gibt es eine Spinne weniger."
|
|
|
|
#. type: Source code
|
|
#: ../E/turn.txt:20
|
|
#, no-wrap
|
|
msgid "<c/>turn ( angle );<n/>"
|
|
msgstr "<c/>turn ( winkel );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:22
|
|
#, no-wrap
|
|
msgid "Turns the bot with a given angle, right or left, without moving either forward or backward. "
|
|
msgstr "Führt eine Drehung um einen gegebenen Winkel aus, nach links oder rechts, ohne Vorwärts- oder Rückwärtsbewegung. "
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:25
|
|
#, no-wrap
|
|
msgid "Angle of the required rotation, in degrees. A positive value turns left, a negative value turns right. <code>turn(180)</code> turns round completely. "
|
|
msgstr "Winkel der gewünschten Drehung, in Grad. Ein positiver Wert dreht nach links, ein negativer Wert nach rechts. <code>turn(180)</code> führt eine halbe Drehung aus."
|
|
|
|
#. type: Plain text
|
|
#: ../E/turn.txt:28
|
|
#, no-wrap
|
|
msgid ""
|
|
"Zero if everything is OK, or a value different from zero if an error occurred. \n"
|
|
"<code>== 0 </code>rotation performed\n"
|
|
"<code>!= 0 </code>rotation impossible"
|
|
msgstr ""
|
|
"Null wenn alles in Ordnung, oder ein Wert verschieden von Null wenn ein Fehler auftrat. \n"
|
|
"<code>== 0 </code>Drehung ausgeführt\n"
|
|
"<code>!= 0 </code>Drehung unmöglich"
|
|
|
|
#. type: \b; header
|
|
#: ../E/type.txt:1
|
|
#, no-wrap
|
|
msgid "Variable types"
|
|
msgstr "Variablentypen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:2
|
|
#, no-wrap
|
|
msgid "When you define a <a cbot|var>variable</a>, you must give two elements: "
|
|
msgstr "Wenn Sie eine <a cbot|var>Variable</a> deklarieren, müssen Sie zwei Elemente angeben: "
|
|
|
|
#. type: Bullet: '1)'
|
|
#: ../E/type.txt:4
|
|
#, no-wrap
|
|
msgid "a name"
|
|
msgstr "den Namen"
|
|
|
|
#. type: Bullet: '2)'
|
|
#: ../E/type.txt:5
|
|
#, no-wrap
|
|
msgid "a type"
|
|
msgstr "den Typ der Variable"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:7
|
|
#, no-wrap
|
|
msgid "Once you defined a variable, you can use it to put information in it. However, the information that a variable can contain must always be of the correct type: a variable of type <a cbot|float>float</a> can not contain a string, etc."
|
|
msgstr "Sobald Sie eine Variable deklariert haben, können Sie Informationen in ihr speichern. Die in einer Variable gespeicherten Informationen müssen jedoch immer vom passenden Typ sein: Eine Variable vom Typ <a cbot|float>float</a> kann keinen String enthalten, usw."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:11
|
|
#, no-wrap
|
|
msgid "<code><a cbot|int>int</a></code>"
|
|
msgstr "<code><a cbot|int>int</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:12
|
|
#, no-wrap
|
|
msgid "For a whole number (12, -500, etc.)."
|
|
msgstr "Für ganze Zahlen (12, -500, usw.)."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:14
|
|
#, no-wrap
|
|
msgid "<code><a cbot|float>float</a></code>"
|
|
msgstr "<code><a cbot|float>float</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:15
|
|
#, no-wrap
|
|
msgid "For a real number (12, 3.14, 0.2, -99.98, etc.)."
|
|
msgstr "Für Kommazahlen (12, 3.14, 0.2, -99.98, usw.)."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:17
|
|
#, no-wrap
|
|
msgid "<code><a cbot|bool>bool</a></code>"
|
|
msgstr "<code><a cbot|bool>bool</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:18
|
|
#, no-wrap
|
|
msgid "For a boolean variable, that can only take the values <code>true</code> or <code>false</code>."
|
|
msgstr "Für eine boolsche Variable, die nur die Werte <code><a cbot|true>true</a></code> (wahr) oder <code><a cbot|false>false</a></code> (falsch) annehmen kann."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:20
|
|
#, no-wrap
|
|
msgid "<code><a cbot|string>string</a></code>"
|
|
msgstr "<code><a cbot|string>string</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:21
|
|
#, no-wrap
|
|
msgid "For texts (\"Hello!\", \"No object found\", etc.)"
|
|
msgstr "Für Strings (Zeichenketten, Texte) wie \"Hello!\", \"Objekt nicht gefunden\", usw.)"
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:23
|
|
#, no-wrap
|
|
msgid "<code><a cbot|point>point</a></code>"
|
|
msgstr "<code><a cbot|point>point</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:24
|
|
#, no-wrap
|
|
msgid "For the coordinates of a point in space; a variable of this type consists of three parts named x, y and z."
|
|
msgstr "Für die Koordinaten eines Punktes im Raum. Eine Variable von diesem Typ besteht aus drei Teilen mit dem Namen x, y und z."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:26
|
|
#, no-wrap
|
|
msgid "<code><a cbot|object>object</a></code>"
|
|
msgstr "<code><a cbot|object>object</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:27
|
|
#, no-wrap
|
|
msgid "A variable of this type contains the information about an object (bot, building, enemy, etc.)."
|
|
msgstr "Eine Variable von diesem Typ enthält Informationen über ein Objekt (Roboter, Gebäude, feindliches Wesen, usw.)."
|
|
|
|
#. type: Source code
|
|
#: ../E/type.txt:29
|
|
#, no-wrap
|
|
msgid "<code><a cbot|void>void</a></code>"
|
|
msgstr "<code><a cbot|void>void</a></code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:30
|
|
#, no-wrap
|
|
msgid "This type is an \"empty type\", that you use when you do not want to specify a type."
|
|
msgstr "Dieser Typ ist sozusagen ein \"leerer Typ\", der benutzt wird, wenn gar keine Information vorhanden ist (z.B. für eine Funktion, die nichts zurückgibt)."
|
|
|
|
#. type: \b; header
|
|
#: ../E/var.txt:1
|
|
#, no-wrap
|
|
msgid "Variables"
|
|
msgstr "Variablen"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:2
|
|
#, no-wrap
|
|
msgid "A variable is like a box, where you can put some information. The content of the variable can change during the execution of the program."
|
|
msgstr "Eine Variable ist wie in Behälter, in dem Sie verschiedene Informationen speichern können. Der Inhalt einer Variable kann während der Ausführung eines Programms ändern."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:4
|
|
#, no-wrap
|
|
msgid "For example, you can use a variable to count the number of titanium ore units that the grabber has collected and carried to the converter. First, you must find a name for it: the name should not be too long, but explain by itself what the variable is used for. Let's call it <code>countTit</code>. This variable must contain only whole numbers, so choose the type <code>int</code>. At the beginning of the program, you must declare the variable. Then you put the value <code>0</code> into the variable, and every time you grab a titanium ore, you increase the variable by <code>1</code>. At every moment, the variable contains the number of titanium ore units that the grabber collected."
|
|
msgstr "Nehmen wir an, Sie wollen die Anzahl Titanerzbrocken zählen, die ein Transporter eingesammelt und zum Konverter gebracht hat. Zuerst müssen Sie einen Namen für die Variable finden: Dieser sollte nicht zu lang sein, den Zweck der Variable aber gut erklären. Nennen wir sie <code>countTit</code>. Diese Variable muss nur ganze Zahlen enthalten, also wählen wir den <a cbot|type>Typ</a> <code><a cbot|int>int</a></code>. Zu Beginn des Programms müssen Sie die Variable deklarieren. Anschließend setzen Sie den Wert der Variable auf <code>Null</code>. Jedes Mal, wenn der Roboter eine Titanerzbrocken ergreift, erhöhen Sie den Wert der Variable um <code>1</code>. So enthält die Variable jederzeit die Anzahl vom Transporter eingesammelter Erzbrocken."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"For the declaration of the variable, write the following line: \n"
|
|
"<c/><s/>\tint countTit;<n/>"
|
|
msgstr ""
|
|
"Um die Variable zu deklarieren, schreiben Sie folgende Zeile: \n"
|
|
"<c/><s/>\tint countTit;<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"To put <code>0</code> into the variable, write:\n"
|
|
"<c/><s/>\tcountTit = 0;<n/>"
|
|
msgstr ""
|
|
"Um den Wert der Variable auf <code>0</code> zu setzen, schreiben Sie:\n"
|
|
"<c/><s/>\tcountTit = 0;<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:12
|
|
#, no-wrap
|
|
msgid ""
|
|
"At every titanium ore grabbed, write:\n"
|
|
"<c/><s/>\tcountTit = countTit + 1<n/>"
|
|
msgstr ""
|
|
"Jedes Mal, wenn ein Erzbrocken eingesammelt wird, schreiben Sie:\n"
|
|
"<c/><s/>\tcountTit = countTit + 1<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"You have much freedom in the choice of the name for a variable, you can call them by any name, f. ex.: <code>dist</code>, <code>direct</code>, <code>p2</code>, <code>a</code>, <code>x</code>, <code>nothing_2_shoot_at</code>, etc.\n"
|
|
"A variable name must always begin with a letter. It can be followed by any combination of letters, digits or the underscore character <code>_</code>. You can of course not use the keywords of the CBOT language like <code><a cbot|for>for</a></code>, <code><a cbot|while>while</a></code>, <code><a cbot|break>break</a></code>, <code><a cbot|continue>continue</a></code>, <code>do</code>, etc.\n"
|
|
"You should be careful about the choice of the names that you give to variables; writing a program can become very difficult if you forget the names of variables or if you do not remember what they are used for. Elaborate your own system to find variable names, and do not use names like <code>Bmo45</code>, <code>a</code> or <code>tgBinX</code>."
|
|
msgstr ""
|
|
"Bei der Wahl der Variablenamen haben Sie viel Freiheit, hier sind Beispiele von möglichen (aber nicht unbedingt sinnvollen) Namen: <code>dist</code>, <code>direct</code>, <code>p2</code>, <code>a</code>, <code>x</code>, <code>geben_sie_8</code>, usw.\n"
|
|
"Ein Variablenname muss immer mit einem Buchstaben anfangen. Anschließend kann er eine beliebige Folge von Buchstaben, Zahlen und Unterstrichen <code>_</code> enthalten. Die Namen der Anweisungen in CBOT wie <code><a cbot|for>for</a></code>, <code><a cbot|while>while</a></code>, <code><a cbot|break>break</a></code>, <code><a cbot|continue>continue</a></code>, <code><a cbot|do>do</a></code>, usw. können Sie natürlich nicht für Variablen benutzen.\n"
|
|
"Überlegen Sie sorgfältig, welchen Namen Sie Ihren Variablen geben. Halten Sie sich am besten an die international gültige Konvention der meisten Programmierer, eine Variable immer mit einem Kleinbuchstaben anfangen zu lassen, keine Unterstrichen zu benutzen, und jedes neue Wort mit einem einzigen Grossbuchstaben anfangen zu lassen, z.B. <code>neuesZiel</code>. Nach und nach werden Sie Ihr eigenes System entwickeln, wie Sie Ihre Variablen nennen, damit Sie sie leicht behalten können. Benutzen Sie auf jeden Fall keine Namen wie <code>Bmo45</code>, <code>a</code> oder <code>tgBinX</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:19
|
|
#, no-wrap
|
|
msgid "In the example above, the keyword <code>int</code> indicates that this variable can contain only whole numbers, which is adequate to counting objects. If you want to measure a distance, better use a variable that can contain also real numbers, with a fractional part (like 3.45 or 0.034): in this case, use the type <code>float</code>."
|
|
msgstr "Im oben genannten Beispiel gibt der Typ <code>int</code> an, dass diese Variable nur ganze Zahlen enthalten kann, was für das Zählen von Objekten durchaus angemessen ist. Wenn Sie jedoch z.B. eine Distanz messen wollen, benutzen Sie einen Typ, der auch Kommazahlen enthalten kann (wie z.B. 3.45 der 0.076), benutzen Sie also den Typ <code><a cbot|float>float</a></code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:21
|
|
#, no-wrap
|
|
msgid "In fact, a variable is made up of three parts:"
|
|
msgstr "Eine Variable besteht also insgesamt aus drei Teilen:"
|
|
|
|
#. type: Bullet: '1)'
|
|
#: ../E/var.txt:22
|
|
#, no-wrap
|
|
msgid "the name,"
|
|
msgstr "dem Namen"
|
|
|
|
#. type: Bullet: '2)'
|
|
#: ../E/var.txt:23
|
|
#, no-wrap
|
|
msgid "the type of the information stored inside,"
|
|
msgstr "dem Typ der gespeicherten Informationen"
|
|
|
|
#. type: Bullet: '3)'
|
|
#: ../E/var.txt:24
|
|
#, no-wrap
|
|
msgid "the content, i.e. the information itself."
|
|
msgstr "dem Inhalt, d.h. der Information selbst."
|
|
|
|
#. type: \t; header
|
|
#: ../E/var.txt:26
|
|
#, no-wrap
|
|
msgid "the name"
|
|
msgstr "Der Name"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:27
|
|
#, no-wrap
|
|
msgid "You need the name to be able to distinguish the different variables from each other."
|
|
msgstr "Sie müssen jeder Variable einen Namen geben, um sie voneinander unterscheiden zu können."
|
|
|
|
#. type: \t; header
|
|
#: ../E/var.txt:29
|
|
#, no-wrap
|
|
msgid "the type"
|
|
msgstr "Der Typ"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:30
|
|
#, no-wrap
|
|
msgid ""
|
|
"The <a cbot|type>type</a> determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a string, the coordinates of a point, information about an object, etc. \n"
|
|
"Here is a list of the most common variable types:"
|
|
msgstr "Der <a cbot|type>Typ</a> bestimmt, welche Art Informationen die Variable enthalten kann. Entsprechend dem Typ kann sie eine ganze Zahl, eine Kommazahl, einen String, die Koordinaten eines Punktes oder die Informationen über ein Objekt enthalten. Hier ist eine Liste der geläufigsten Variablentypen:"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/var.txt:32
|
|
#, no-wrap
|
|
msgid "<code><a cbot|int>int</a></code> for a whole number (12, -500, etc.)"
|
|
msgstr "<code><a cbot|int>int</a></code> für ganze Zahlen (12, -500, usw.)"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/var.txt:33
|
|
#, no-wrap
|
|
msgid "<code><a cbot|float>float</a></code> for a real number (3.14, 0.2, -99.98, etc.)"
|
|
msgstr "<code><a cbot|float>float</a></code> für Kommazahlen (3.14, 0.2, -99.98, usw.)"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/var.txt:34
|
|
#, no-wrap
|
|
msgid "<code><a cbot|string>string</a></code> for a character string (\"Hello!\", \"No object found\", etc.)"
|
|
msgstr "<code><a cbot|string>string</a></code> für Strings (\"Hello!\", \"Objekt nicht gefunden\", usw.)"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/var.txt:35
|
|
#, no-wrap
|
|
msgid "<code><a cbot|point>point</a></code> for a x,y,z-coordinate in space"
|
|
msgstr "<code><a cbot|point>point</a></code> für eine x,y,z-Koordinate im Raum"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/var.txt:36
|
|
#, no-wrap
|
|
msgid "<code><a cbot|object>object</a></code> for information about an object (bot, building, etc.)"
|
|
msgstr "<code><a cbot|object>object</a></code> für die Informationen über ein Objekt (Roboter, Gebäude, usw.)"
|
|
|
|
#. type: \t; header
|
|
#: ../E/var.txt:38
|
|
#, no-wrap
|
|
msgid "The content"
|
|
msgstr "Der Inhalt"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:39
|
|
#, no-wrap
|
|
msgid "The content of a variable is an information of the kind specified in the type. It can change during the execution of the program. "
|
|
msgstr "Der Inhalt einer Variable ist eine Information, deren Art dem Typ der Variable entsprechen muss. Der Inhalt kann während der Ausführung des Programms wiederholt ändern."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:41
|
|
#, no-wrap
|
|
msgid ""
|
|
"Once you declared a variable, it still does not contain any value. Before you can use it, you must put a value inside: \n"
|
|
"<c/><s/>\tint i, j;"
|
|
msgstr ""
|
|
"Nachdem Sie eine Variable deklariert haben, enthält sie noch keinen Wert. Bevor Sie den Inhalt der Variable benutzen können, müssen Sie eine Information darin speichern: \n"
|
|
"<c/><s/>\tint i, j;"
|
|
|
|
#. type: Source code
|
|
#: ../E/var.txt:43
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tj = 25; // j takes the value 25\n"
|
|
"\tj = i; // can not write this, because i has got no content yet."
|
|
msgstr ""
|
|
"\tj = 25; // j enthält den Wert 25\n"
|
|
"\tj = i; // das können Sie nicht schreiben,\n"
|
|
"\t // da i noch keinen Inhalt hat."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:46
|
|
#, no-wrap
|
|
msgid ""
|
|
"You can also declare a variable and put a value inside in the same line, writing: \n"
|
|
"<c/><s/>\tint countTit = 0;"
|
|
msgstr ""
|
|
"Sie können auf der gleichen Zeile eine Variable deklarieren und ihr einen Inhalt zuweisen: \n"
|
|
"<c/><s/>\tint countTit = 0;"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:49
|
|
#, no-wrap
|
|
msgid ""
|
|
"When you assign a value to a variable with the equals sign <code>=</code>, the value on the right side is copied into the value on the left side. Consider the following example: \n"
|
|
"<c/><s/>\tint i, j;"
|
|
msgstr ""
|
|
"Wenn Sie einer Variable mit dem Gleichzeichen <code>=</code> einen Inhalt zuweisen, wird der Wert rechts vom Gleichzeichen in die Variable links vom Gleichzeichen kopiert, z.B.: \n"
|
|
"<c/><s/>\tint i, j;"
|
|
|
|
#. type: Source code
|
|
#: ../E/var.txt:51
|
|
#, no-wrap
|
|
msgid ""
|
|
"\ti = 5+2; // i takes the value 7\n"
|
|
"\tj = i+6; // j takes the value of i plus 6, this is 13\n"
|
|
"\ti = j; // i takes the value of j, this is 13"
|
|
msgstr ""
|
|
"\ti = 5+2; // i enthält 7\n"
|
|
"\tj = i+6; // j enthält den Wert von i plus 6, also 13\n"
|
|
"\ti = j; // i enthält den Wert von j, also 13"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:55
|
|
#, no-wrap
|
|
msgid "At the end of this example, both variables <code>i</code> and <code>j</code> contain the value <code>13</code>."
|
|
msgstr "Am Ende dieses Beispiels enthalten beide Variablen <code>i</code> und <code>j</code> den Wert <code>13</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:57
|
|
#, no-wrap
|
|
msgid ""
|
|
"The following assignment is not correct, because on the left side of the equals sign <code>=</code>, there can be only a variable name:\n"
|
|
"<c/><s/>\ti+2 = j; // impossible"
|
|
msgstr ""
|
|
"Folgende Zuweisung ist nicht korrekt, da auf der linken Seite des Gleichzeichens <code>=</code> nur der Name einer Variable, jedoch nicht eine ganze Berechnung stehen kann:\n"
|
|
"<c/><s/>\ti+2 = j; // unmöglich"
|
|
|
|
#. type: Plain text
|
|
#: ../E/var.txt:60
|
|
#, no-wrap
|
|
msgid ""
|
|
"If you want to exchange the values of two variables, you must use a third variable. Here is an example to exchange the content of two variables <code>a</code> and <code>b</code> :\n"
|
|
"<c/><s/>\tint temp;"
|
|
msgstr ""
|
|
"Wenn Sie den Inhalt von zwei Variablen miteinander vertauschen wollen, brauchen Sie eine dritte Variable als Zwischenspeicher. Hier ist ein Beispiel, in dem der Inhalt der zwei Variablen <code>a</code> und <code>b</code> vertauscht wird:\n"
|
|
"<c/><s/>\tint temp;"
|
|
|
|
#. type: Source code
|
|
#: ../E/var.txt:62
|
|
#, no-wrap
|
|
msgid ""
|
|
"\ttemp = a; // temp takes the value of a\n"
|
|
"\ta = b; // the content of b is copied into a\n"
|
|
"\tb = temp; // the content of temp is copied into b"
|
|
msgstr ""
|
|
"\ttemp = a; // erhält den Wert von a\n"
|
|
"\ta = b; // der Inhalt von b wird in a kopiert\n"
|
|
"\tb = temp; // der Inhalt von temp wird in b kopiert"
|
|
|
|
#. type: \b; header
|
|
#: ../E/void.txt:1
|
|
#, no-wrap
|
|
msgid "Type <code>void</code>"
|
|
msgstr "Typ <code>void</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/void.txt:2
|
|
#, no-wrap
|
|
msgid "Use this type when you want to declare a function that returns nothing."
|
|
msgstr "Benutzen Sie diesen Typ in der Deklaration einer Funktion, die nichts zurückgibt."
|
|
|
|
#. type: Plain text
|
|
#: ../E/void.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"Example:\n"
|
|
"<c/><s/>void MyFunction(int a)"
|
|
msgstr "<c/><s/>void MyFunction(int a)"
|
|
|
|
#. type: Source code
|
|
#: ../E/void.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\t...\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\t...\n"
|
|
"}"
|
|
|
|
#. type: \b; header
|
|
#: ../E/wait.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>wait</code>"
|
|
msgstr "Anweisung <code>wait</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/wait.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>wait();<n/> instructs the bot to wait for some seconds, according to the value written in brackets."
|
|
msgstr "Der Befehl <c/>wait();<n/> weist den Roboter an, einige Sekunden zu warten, je nach dem in Klammern angegebenen Wert."
|
|
|
|
#. type: Plain text
|
|
#: ../E/wait.txt:5
|
|
#, no-wrap
|
|
msgid "In order to wait until the <a object|power>power cell</a> is recharged on a power station, wait 5 seconds with <c/>wait(5);<n/>."
|
|
msgstr "Wenn der Roboter auf einem Kraftwerk steht, müssen Sie maximal 5 Sekunden warten bis die <a object|power>Batterie</a> voll geladen ist. Schreiben Sie also <c/>wait(5);<n/>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/wait.txt:7
|
|
#, no-wrap
|
|
msgid "In order to wait until the <a object|convert>converter</a> finished transforming some <a object|titanore>titanium ore</a> in a <a object|titan>titanium cube</a>, wait 15 seconds with <c/>wait(15);<n/>."
|
|
msgstr "Wenn Sie vor einem <a object|convert>Konverter</a> warten bis dieser das <a object|titanore>Erz</a> in <a object|titan>Titan</a> umgewandelt hat, warten Sie 15 Sekunden mit <c/>wait(15);<n/>."
|
|
|
|
#. type: Source code
|
|
#: ../E/wait.txt:11
|
|
#, no-wrap
|
|
msgid "<c/>wait ( time );<n/>"
|
|
msgstr "<c/>wait ( zeit );<n/>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/wait.txt:13
|
|
#, no-wrap
|
|
msgid "Waits for a moment."
|
|
msgstr "Wartet ein bestimmte Zeit."
|
|
|
|
#. type: Plain text
|
|
#: ../E/wait.txt:16
|
|
#, no-wrap
|
|
msgid "Specifies the time that the bot must wait."
|
|
msgstr "Gibt die Zeit in Sekunden an, die der Roboter warten soll."
|
|
|
|
#. type: \b; header
|
|
#: ../E/while.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>while</code>"
|
|
msgstr "Anweisung <code>while</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <code>while () {}</code> is used to repeat a set of instructions several times."
|
|
msgstr "Die Anweisung <code>while () {}</code> wird benutzt, um eine Gruppe von Anweisungen mehrmals zu wiederholen."
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:5
|
|
#, no-wrap
|
|
msgid "The most frequent use of <code>while</code> consists in repeating a set of instructions again and again. In order to achieve this, write <code>while (true) {}</code> and put the instructions to be repeated in braces <code>{}</code>. As an example, here is a program that repeats again and again the following actions:"
|
|
msgstr "Die häufigste Anweisung von <code>while</code> in einfachen Programmen besteht darin, das eine Gruppe von Anweisungen unendlich lang wiederholt wird. Das Programm wird dann automatisch angehalten, sobald die Aufgabe erfüllt ist. Um eine unendliche Schleife zu erzielen, schreiben Sie <code>while (true) {}</code> und setzen Sie die zu wiederholenden Anweisungen zwischen die geschwungenen Klammern <code>{}</code>. Hier ist als Beispiel ein Programm, das unendlich lang folgende Handlungen wiederholt:"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/while.txt:6
|
|
#, no-wrap
|
|
msgid "look for a spider,"
|
|
msgstr "sucht eine Spinne,"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/while.txt:7
|
|
#, no-wrap
|
|
msgid "turn towards it,"
|
|
msgstr "dreht in ihre Richtung,"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/while.txt:8
|
|
#, no-wrap
|
|
msgid "shoot."
|
|
msgstr "schießt."
|
|
|
|
#. type: Source code
|
|
#: ../E/while.txt:10
|
|
#, no-wrap
|
|
msgid ""
|
|
"\twhile (true)\n"
|
|
"\t{\n"
|
|
"\t\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
|
|
"\t\t<a cbot|turn>turn</a>(direction(item.position));\n"
|
|
"\t\t<a cbot|fire>fire</a>(1);\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\twhile (true)\n"
|
|
"\t{\n"
|
|
"\t\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
|
|
"\t\t<a cbot|turn>turn</a>(direction(item.position));\n"
|
|
"\t\t<a cbot|fire>fire</a>(1);\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:17
|
|
#, no-wrap
|
|
msgid "Just execute this program once, and it will kill all spiders around it."
|
|
msgstr "Sie müssen dieses Programm nur gerade einmal ausführen, und keine Spinne rundherum in Reichweite wird überleben."
|
|
|
|
#. type: Source code
|
|
#: ../E/while.txt:21
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>while ( condition )\n"
|
|
"{\n"
|
|
"\t</code>Instructions ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"<code>while ( bedingung )\n"
|
|
"{\n"
|
|
"\t</code>Anweisungen ...<c/>\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:26
|
|
#, no-wrap
|
|
msgid "This instruction allows you to perform the instructions inside the <a cbot|bloc>block</a> several times."
|
|
msgstr "Mit dieser Anweisung können Sie Anweisungen in dem <a cbot|bloc>Block</a> mehrmals ausführen, solange eine bestimmte Bedingung wahr ist."
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:28
|
|
#, no-wrap
|
|
msgid "Be careful not to confuse the instruction <code>while( ) { }</code> with the instruction <c/><a cbot|do>do</a> { } while( );<n/>; the latter tests the condition only after the instructions in the block have been performed a first time. "
|
|
msgstr "Bitte verwechseln Sie die Anweisung <code>while( ) { }</code> nicht mit der Anweisung <c/><a cbot|do>do</a> { } while( );<n/>; Letztere testet die Bedingung erst wenn die Anweisungen im Block ein erstes Mal ausgeführt wurden."
|
|
|
|
#. type: Source code
|
|
#: ../E/while.txt:34
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( i < 10 )\n"
|
|
"{\n"
|
|
"\t<n/>Instructions ...<c/>\n"
|
|
"\ti = i+1;\n"
|
|
"}"
|
|
msgstr ""
|
|
"<c/>int i = 0;\n"
|
|
"while ( i < 10 )\n"
|
|
"{\n"
|
|
"\t<n/>Anweisungen ...<c/>\n"
|
|
"\ti = i+1;\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:42
|
|
#, no-wrap
|
|
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>while ( )</code>."
|
|
msgstr "Setzen Sie keinen <a cbot|term>Strickpunkt</a> am Ende der Zeile <code>while()</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../E/while.txt:44
|
|
#, no-wrap
|
|
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>while { }</code>."
|
|
msgstr "Die Anweisungen <code><a cbot|break>break</a></code> und <code><a cbot|continue>continue</a></code> können im Block einer <code>while{}</code>-Anweisung eingesetzt werden."
|
|
|
|
#. type: \b; header
|
|
#: ../E/writeln.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>writeln</code>"
|
|
msgstr "Anweisung <code>writeln</code>"
|
|
|
|
#. type: Plain text
|
|
#: ../E/writeln.txt:2
|
|
#, no-wrap
|
|
msgid "Write one line of text to an open file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.writeln()</code>:"
|
|
msgstr "Schreibt eine Textzeile in eine offene Datei im Ordner <c/>\\files\\<n/>. Dies ist eine Methode der Klasse <code><a cbot|file>file</a></code>. Schreiben Sie deshalb diese Anweisung immer mit dem Namen einer Instanzvariable vorher, z.B. <code>handle.writeln()</code>:"
|
|
|
|
#. type: Source code
|
|
#: ../E/writeln.txt:4
|
|
#, no-wrap
|
|
msgid "\thandle.writeln(\"abc\");"
|
|
msgstr "\thandle.writeln(\"abc\");"
|
|
|
|
#. type: Plain text
|
|
#: ../E/writeln.txt:6
|
|
#, no-wrap
|
|
msgid "The file must have been opened for writing (<code>\"w\"</code>) with the <code><a cbot|open>open</a></code> instruction. The line will automatically be terminated by the end of line characters 0x0D (CR) and 0x0A (LF)."
|
|
msgstr "Die Datei, in die Sie schreiben wollen, muss zuvor mit der Anweisung <code><a cbot|open>open</a></code> im Schreibmodus (<code>\"w\"</code>) geöffnet werden. Die geschriebene Zeile wird automatisch mit den Zeichen für ein Zeilenende beendet, 0x0D (CR) und 0x0A (LF)."
|
|
|
|
#. type: Source code
|
|
#: ../E/writeln.txt:9
|
|
#, no-wrap
|
|
msgid "<c/>handle.writeln ( string );<n/>"
|
|
msgstr "<c/>handle.writeln ( string );<n/>"
|
|
|
|
#. type: Source code
|
|
#: ../E/writeln.txt:13
|
|
#, no-wrap
|
|
msgid "\twriteln(\"Line of text\");"
|
|
msgstr "\twriteln(\"Eine Textzeile\");"
|
|
|
|
#. type: Source code
|
|
#: ../E/writeln.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tstring s1 = \"abc\";\n"
|
|
"\tstring s2 = \"def\";\n"
|
|
"\twriteln(s1 + \" \" + s2);"
|
|
msgstr ""
|
|
"\tstring s1 = \"abc\";\n"
|
|
"\tstring s2 = \"def\";\n"
|
|
"\twriteln(s1 + \" \" + s2);"
|
|
|
|
#. type: Plain text
|
|
#: ../E/writeln.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
"<code><a cbot|file>Dateien</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> und <code><a cbot|eof>eof</a></code>.\n"
|
|
"Die <a cbot>CBOT-Sprache</a>, <a cbot|type>Variablentypen</a> und <a cbot|category>Kategorien</a>."
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"{\n"
|
|
"\tint a[5];\n"
|
|
"\ta[7] = 123; // no error at compile time\n"
|
|
"\t // but error at run time\n"
|
|
"}"
|
|
msgstr ""
|
|
"{\n"
|
|
"\tint a[5];\n"
|
|
"\ta[7] = 123; // Keine Fehlermeldung bei der\n"
|
|
"\t // Kompilation, erst beim Ausführen\n"
|
|
"}"
|
|
|
|
#. type: Source code
|
|
#: ../E/bloc.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"\t{\n"
|
|
"\t\tfloat t;\n"
|
|
"\t\tt = a;\n"
|
|
"\t\ta = b;\n"
|
|
"\t\tb = t; // switches round a and b\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\t{\n"
|
|
"\t\tfloat t;\n"
|
|
"\t\tt = a;\n"
|
|
"\t\ta = b;\n"
|
|
"\t\tb = t; // vertauscht a und b\n"
|
|
"\t}"
|
|
|
|
#. type: Source code
|
|
#: ../E/bloc.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tif ( a < b )\n"
|
|
"\t{\n"
|
|
"\t\t<n/>instruction 1<c/>;\n"
|
|
"\t\t<n/>instruction 2<c/>;\n"
|
|
"\t}\n"
|
|
"\t<n/>instruction 3<c/>;"
|
|
msgstr ""
|
|
"\tif ( a < b )\n"
|
|
"\t{\n"
|
|
"\t\t<n/>Anweisung 1<c/>;\n"
|
|
"\t\t<n/>Anweisung 2<c/>;\n"
|
|
"\t}\n"
|
|
"\t<n/>Anweisung 3<c/>;"
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:131 ../E/radar.txt:68
|
|
#, no-wrap
|
|
msgid "Remark"
|
|
msgstr "Bemerkung"
|
|
|
|
#. type: \t; header
|
|
#: ../E/shield.txt:12
|
|
#, no-wrap
|
|
msgid "radius: <code><a cbot|float>float</a></code>"
|
|
msgstr "reichweite: <code><a cbot|float>float</a></code>"
|
|
|
|
#. type: \b; header
|
|
#: ../E/acos.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>acos</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/acos.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>acos ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/acos.txt:5 ../E/asin.txt:5 ../E/atan.txt:5 ../E/ceil.txt:6 ../E/floor.txt:6 ../E/round.txt:6 ../E/sqrt.txt:5 ../E/trunc.txt:6
|
|
#, no-wrap
|
|
msgid "value: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/acos.txt:6 ../E/asin.txt:6
|
|
#, no-wrap
|
|
msgid "Number between -1 and 1 (including both)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/acos.txt:9
|
|
#, no-wrap
|
|
msgid "Arcus cosine (in degrees) of the value."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/acos.txt:12 ../E/asin.txt:12 ../E/atan.txt:12 ../E/atan2.txt:17 ../E/cos.txt:12 ../E/pow.txt:15 ../E/rand.txt:9 ../E/sin.txt:12 ../E/sqrt.txt:12 ../E/tan.txt:12
|
|
#, no-wrap
|
|
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/aim.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>aim ( y, x );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/aim.txt:5
|
|
#, no-wrap
|
|
msgid "This instruction sets the vertical and the horizontal angle of the cannon. The following robots are equipped with a cannon: "
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/aim.txt:10
|
|
#, no-wrap
|
|
msgid "When controlling the robot through programming, the gun can be also turned left or right by turning the whole robot with the instruction <code><a cbot|turn>turn</a></code>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/aim.txt:12 ../E/atan2.txt:7 ../E/pow.txt:8
|
|
#, no-wrap
|
|
msgid "y: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/aim.txt:15
|
|
#, no-wrap
|
|
msgid "x: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/aim.txt:16
|
|
#, no-wrap
|
|
msgid "Angle in degrees of the gun relative to the robot. A positive value orients the gun to the right. The angle must range from <code>-40</code> to <code>+40</code> degrees for all shooters."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/asin.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>asin</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/asin.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>asin ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/asin.txt:9
|
|
#, no-wrap
|
|
msgid "Arcus sine (in degrees) of the value."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/atan.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>atan</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/atan.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>atan ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/atan.txt:6 ../E/atan2.txt:8 ../E/atan2.txt:11 ../E/ceil.txt:7 ../E/floor.txt:7 ../E/round.txt:7 ../E/trunc.txt:7
|
|
#, no-wrap
|
|
msgid "Number."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/atan.txt:9
|
|
#, no-wrap
|
|
msgid "Arcus tangent (in degrees) of the value."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/atan2.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>atan2</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/atan2.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>atan2 ( y, x );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/atan2.txt:5
|
|
#, no-wrap
|
|
msgid "The purpose of using two arguments instead of one is to gather information on the signs of the inputs in order to return the appropriate quadrant of the computed angle, which is not possible for the single-argument <c/><a cbot|atan>atan();</a><n/> function. For example, consider a point <code>(-1, -1)</code>: <c/>atan(-1/-1);<n/> is <code>45.00</code> degrees, whereas <c/>atan2(-1, -1);<n/> is <code>-135.00</code> degrees, which is obviously more correct in this case."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/atan2.txt:10 ../E/pow.txt:5
|
|
#, no-wrap
|
|
msgid "x: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/atan2.txt:14
|
|
#, no-wrap
|
|
msgid "Arcus tangent (in degrees) of <code>y/x</code>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/build.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>build</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>build();<n/> instructs the bot to build a building of the given <a cbot|category>category</a>. Currently works for <a object|botgc>Grabbers</a>, <a object|human>Me</a> and <a object|tech>Tech</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:5
|
|
#, no-wrap
|
|
msgid "This command is mostly useful in an attempt to build a fully automatised base, where an <a object|human>astronaut</a> does not need to do anything except starting a program and watching bots working. What is more, it makes beating the game by using only programming a possible task (however, it is a challenge rather for experienced gamers, who beat the whole game at least once)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:7
|
|
#, no-wrap
|
|
msgid "Here is an example of a program that looks for the nearest <a object|titan>titanium cube</a>, goes to the position and builds a <a object|factory>bot factory</a>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/build.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
" <a cbot|object>object</a> item = <a cbot|radar>radar</a>(<a object|titan>Titanium</a>);\n"
|
|
" <a cbot|goto>goto</a>(item.position);\n"
|
|
" build(<a object|factory>BotFactory</a>);"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/build.txt:15
|
|
#, no-wrap
|
|
msgid "<c/>build ( cat );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:17
|
|
#, no-wrap
|
|
msgid "Tells the robot to build a building using a titanium cube placed on a flat ground nearby."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/build.txt:19 ../E/buildingenabled.txt:16 ../E/canbuild.txt:16 ../E/detect.txt:11 ../E/factory.txt:10 ../E/radar.txt:22
|
|
#, no-wrap
|
|
msgid "cat: <code><a cbot|int>int</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:20 ../E/buildingenabled.txt:17 ../E/canbuild.txt:17
|
|
#, no-wrap
|
|
msgid "<a cbot|category>Category</a> of a building."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:23
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>build()</code>.\n"
|
|
"<code>== 0 </code>Successfully built\n"
|
|
"<code>!= 0 </code>Impossible to build (for example, the nearest titanium cube is too far away or the specified building is not available in the mission)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/build.txt:28
|
|
#, no-wrap
|
|
msgid "<a cbot|canbuild>canbuild</a>, <a cbot|buildingenabled>buildingenabled</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/buildingenabled.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>buildingenabled</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/buildingenabled.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>buildingenabled();<n/> lets you know if a building of the given <a cbot|category>category</a> can be built in the level."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/buildingenabled.txt:5
|
|
#, no-wrap
|
|
msgid "It is similar to the <c/><a cbot|canbuild>canbuild();</a><n/> instruction. However, it does not check if a required research has been done."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/buildingenabled.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
" <a cbot|if>if</a> (buildingenabled(<a object|factory>BotFactory</a>))\n"
|
|
" {\n"
|
|
" \tbuild(<a object|factory>BotFactory</a>);\n"
|
|
" }"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/buildingenabled.txt:14
|
|
#, no-wrap
|
|
msgid "<c/>buildingenabled ( cat );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/buildingenabled.txt:19 ../E/busy.txt:10 ../E/canbuild.txt:19 ../E/canresearch.txt:10 ../E/detect.txt:23 ../E/researched.txt:10
|
|
#, no-wrap
|
|
msgid "Return value: <code><a cbot|bool>bool</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/buildingenabled.txt:20
|
|
#, no-wrap
|
|
msgid "<code>true</code> if the building can be built in the level even if required research has not been done, <code>false</code> otherwise."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/buildingenabled.txt:23
|
|
#, no-wrap
|
|
msgid "<a cbot|build>build</a>, <a cbot|canbuild>canbuild</a>, <a object|research>ResearchCenter</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/busy.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>busy</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/busy.txt:3
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|object>object</a>.busy ( );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/busy.txt:5
|
|
#, no-wrap
|
|
msgid "Checks if the object is busy."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/busy.txt:7 ../E/destroy.txt:7 ../E/factory.txt:7 ../E/research.txt:7 ../E/takeoff.txt:7
|
|
#, no-wrap
|
|
msgid "<a cbot|object>object</a>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/busy.txt:8
|
|
#, no-wrap
|
|
msgid "Any building which can take some action (e.g. <a cbot|convert>Converter</a>)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/busy.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>true</format></code> if the object is doing something (e.g. converting)\n"
|
|
"<code><format const>false</format></code> if the object is not doing anything"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/canbuild.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>canbuild</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canbuild.txt:2
|
|
#, no-wrap
|
|
msgid "The instruction <c/>canbuild();<n/> lets you know if <a object|botgc>Grabbers</a>, <a object|human>Me</a> or <a object|human>Tech</a> can build a building of the given <a cbot|category>category</a>. "
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canbuild.txt:5
|
|
#, no-wrap
|
|
msgid "It helps to prevent errors in programs using the <c/><a cbot|build>build();</a><n/> instruction. Here is an example:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/canbuild.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
" <a cbot|if>if</a> (canbuild(<a object|factory>BotFactory</a>))\n"
|
|
" {\n"
|
|
" \tbuild(<a object|factory>BotFactory</a>);\n"
|
|
" }"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/canbuild.txt:14
|
|
#, no-wrap
|
|
msgid "<c/>canbuild ( cat );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canbuild.txt:20
|
|
#, no-wrap
|
|
msgid "<code>true</code> if the building can be built, <code>false</code> otherwise."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canbuild.txt:23
|
|
#, no-wrap
|
|
msgid "<a cbot|build>build</a>, <a cbot|buildingenabled>buildingenabled</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/canresearch.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>canresearch</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/canresearch.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>canresearch ( research );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canresearch.txt:5
|
|
#, no-wrap
|
|
msgid "Checks if the <a cbot|researches>research</a> can be done in the level."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/canresearch.txt:7 ../E/researched.txt:7
|
|
#, no-wrap
|
|
msgid "research: <code><a cbot|int>int</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canresearch.txt:8 ../E/research.txt:11 ../E/researched.txt:8
|
|
#, no-wrap
|
|
msgid "<a cbot|researches>Research name</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canresearch.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<format const>true</format> if the research can be done (even if it is already done, to check that, use the <a cbot|researched>researched</a> instruction)\n"
|
|
"<format const>false</format> if the research cannot be done"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/canresearch.txt:15
|
|
#, no-wrap
|
|
msgid "<a cbot|researches>Research names</a>, <a cbot|research>research</a>, <a cbot|researched>researched</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:6
|
|
#, no-wrap
|
|
msgid "Below are the different categories available:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:8
|
|
#, no-wrap
|
|
msgid "Buildings:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:32
|
|
#, no-wrap
|
|
msgid "Portable Objects:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:45
|
|
#, no-wrap
|
|
msgid "Robots:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:82
|
|
#, no-wrap
|
|
msgid "Enemies:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:92
|
|
#, no-wrap
|
|
msgid "Miscellaneous:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/category.txt:101
|
|
#, no-wrap
|
|
msgid "Flags and Other Indicators:"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/ceil.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>ceil</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/ceil.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>ceil ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/ceil.txt:4
|
|
#, no-wrap
|
|
msgid "Rounds up a number."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/ceil.txt:10
|
|
#, no-wrap
|
|
msgid "Ceiling of the value, i.e. the smallest integer not less than <code>value</code>. For example, <code>ceil(2.1)</code> is <code>3.0</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/ceil.txt:13 ../E/floor.txt:13 ../E/trunc.txt:13
|
|
#, no-wrap
|
|
msgid "<a cbot|round>round</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/colors.txt:1
|
|
#, no-wrap
|
|
msgid "Value <code>Colors</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:2
|
|
#, no-wrap
|
|
msgid "Color names are used to define a specific color to use. They can be passed to functions like <a cbot|pendown>pendown</a> or <a cbot|pencolor>pencolor</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:4
|
|
#, no-wrap
|
|
msgid "In a program, colors are always displayed on a <format const>red background</format>. If a color isn't highlighted in red, it is misspelled. Caps and lower cases should be kept as is."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:6
|
|
#, no-wrap
|
|
msgid "Below are the different colors available:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:8
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>White</format></code>\n"
|
|
"<code><format const>Black</format></code>\n"
|
|
"<code><format const>Gray</format></code>\n"
|
|
"<code><format const>LightGray</format></code>\n"
|
|
"<code><format const>Red</format></code>\n"
|
|
"<code><format const>Pink</format></code>\n"
|
|
"<code><format const>Purple</format></code>\n"
|
|
"<code><format const>Orange</format></code>\n"
|
|
"<code><format const>Yellow</format></code>\n"
|
|
"<code><format const>Beige</format></code>\n"
|
|
"<code><format const>Brown</format></code>\n"
|
|
"<code><format const>Skin</format></code>\n"
|
|
"<code><format const>Green</format></code>\n"
|
|
"<code><format const>LightGreen</format></code>\n"
|
|
"<code><format const>Blue</format></code>\n"
|
|
"<code><format const>LightBlue</format></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:25
|
|
#, no-wrap
|
|
msgid "You can also draw colored symbols:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/colors.txt:27
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>BlackArrow</format></code>\n"
|
|
"<code><format const>RedArrow</format></code>"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/cos.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>cos</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/cos.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>cos ( angle );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/cos.txt:6 ../E/sin.txt:6
|
|
#, no-wrap
|
|
msgid "Angle in degrees."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/cos.txt:9
|
|
#, no-wrap
|
|
msgid "Cosine of the angle."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/destroy.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>destroy</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/destroy.txt:3
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|object>object</a>.destroy ( );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/destroy.txt:5
|
|
#, no-wrap
|
|
msgid "Destroys an object."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/destroy.txt:8
|
|
#, no-wrap
|
|
msgid "<a object|destroy>Destroyer</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/destroy.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>destroy()</code>.\n"
|
|
"<code>== 0 </code>The operation of destroying of an object was started\n"
|
|
"<code>!= 0 </code>The instruction could not be done (e.g. nothing to destroy)"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/detect.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>detect</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/detect.txt:2
|
|
#, no-wrap
|
|
msgid "With the instruction <c/>detect();<n/>, you can look for objects like <a object|mother>enemies</a>, bots, buildings or raw materials, which are in front of the bot. It is a simpler version of <c/><a cbot|radar>radar</a>();<n/>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/detect.txt:6
|
|
#, no-wrap
|
|
msgid "<c/>detect ( cat );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/detect.txt:8
|
|
#, no-wrap
|
|
msgid "Detects the nearest object of the specified <a cbot|category>category</a> being in front of the bot. It is similar to the following instruction:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/detect.txt:9
|
|
#, no-wrap
|
|
msgid "<c/>radar(cat, 0, 45, 0, 20);<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/detect.txt:12 ../E/radar.txt:23
|
|
#, no-wrap
|
|
msgid "<a cbot|category>Category</a> of the objects that should be detected. For example, when you are looking for an ant, write <code>radar(AlienAnt)</code>. "
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/detect.txt:13
|
|
#, no-wrap
|
|
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers:<c/>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/detect.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"int bots[4];\n"
|
|
"bots[0] = WheeledGrabber;\n"
|
|
"bots[1] = TrackedGrabber;\n"
|
|
"bots[2] = WingedGrabber;\n"
|
|
"bots[3] = LeggedGrabber;\n"
|
|
"object nearestGrabber = radar(bots);"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/detect.txt:21 ../E/search.txt:17
|
|
#, no-wrap
|
|
msgid "Keyword <format const>Any</format> if you are looking for any object (including even plants and so on)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/detect.txt:24
|
|
#, no-wrap
|
|
msgid ""
|
|
"<format const>true</format> if the object was found\n"
|
|
"<format const>false</format> if the object was not found"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/factory.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>factory</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/factory.txt:3
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|object>object</a>.factory ( cat, program );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:5
|
|
#, no-wrap
|
|
msgid "Starts a construction of a bot of the given <a cbot|category>category</a> and runs the specified program on it after the construction is finished."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:8
|
|
#, no-wrap
|
|
msgid "<a object|factory>BotFactory</a>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:11
|
|
#, no-wrap
|
|
msgid "<a cbot|category>Category</a> of the robot to construct."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/factory.txt:13
|
|
#, no-wrap
|
|
msgid "program: <code><a cbot|string>string</a></code> (default value: <code>\"\"</code>)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:14
|
|
#, no-wrap
|
|
msgid "Program that will be run on the bot after factory finishes the construction. This can be either a <a cbot|public>public</a> <a cbot|function>function</a>, a <a cbot|file>filename</a> or just a raw source code."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>factory()</code>.\n"
|
|
"<code>== 0 </code>The construction successfully started\n"
|
|
"<code>!= 0 </code>The construction could not be started (e.g. no <a object|titan>Titanium</a> in the factory, the bot is not researched)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/factory.txt:22
|
|
#, no-wrap
|
|
msgid "<a cbot|researched>researched</a>, <a cbot|>wait</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/flatspace.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>flatspace</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/flatspace.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>flatspace ( center, flatmin, rmin, rmax, dist );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:5
|
|
#, no-wrap
|
|
msgid "Determines the position of the nearest free space with at least <code>flatmin</code> of flat ground around a given position. Works similar to <c/><a cbot|space>space();</a><n/>. Useful for finding a place for a <a cbot|category>building</a>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/flatspace.txt:10
|
|
#, no-wrap
|
|
msgid "flatmin: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/flatspace.txt:11
|
|
#, no-wrap
|
|
msgid "Minimum radius of flat ground around the desired position."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/floor.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>floor</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/floor.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>floor ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/floor.txt:4
|
|
#, no-wrap
|
|
msgid "Rounds down a number."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/floor.txt:10
|
|
#, no-wrap
|
|
msgid "Floor of the value, i.e. the largest integer not greater than <code>value</code>. For example, <code>floor(2.9)</code> is <code>2.00</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"Example: count from 1 to 4\n"
|
|
"<c/><s/><c/>for ( i = 1 ; i <= 4 ; i++ )"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:2
|
|
#, no-wrap
|
|
msgid "Function, simply put, is an instruction created by you."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:4
|
|
#, no-wrap
|
|
msgid "Main function"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:5
|
|
#, no-wrap
|
|
msgid "You probably already know how to create a function. Every program in CBOT must have a main function, which looks like this:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::ProgramName()\n"
|
|
"{\n"
|
|
"\t\n"
|
|
"\t// instructions\n"
|
|
"\t\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:17
|
|
#, no-wrap
|
|
msgid "With functions you can divide your program into several parts. Each of them will execute a specific task. For example, see the following program:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Remote()\n"
|
|
"{\n"
|
|
"\tsend(\"order\", 1, 100);\n"
|
|
"\twait(5);\n"
|
|
"\tsend(\"order\", 3, 100);\n"
|
|
"\twait(5);\n"
|
|
"\tsend(\"order\", 2, 100);\n"
|
|
"\twait(5);\n"
|
|
"\tsend(\"order\", 4, 100);\n"
|
|
"\twait(5);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:31
|
|
#, no-wrap
|
|
msgid "<code><a cbot|send>send</a></code> and <code><a cbot|wait>wait</a></code> are repeated several times. So it would be a good thing if we created a function that executes these two instructions:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:33
|
|
#, no-wrap
|
|
msgid ""
|
|
"void SendToPost(float op)\n"
|
|
"{\n"
|
|
"\tsend(\"order\", op, 100);\n"
|
|
"\twait(5);\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Remote()\n"
|
|
"{\n"
|
|
"\tSendToPost(1);\n"
|
|
"\tSendToPost(3);\n"
|
|
"\tSendToPost(2);\n"
|
|
"\tSendToPost(4);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:47
|
|
#, no-wrap
|
|
msgid "Now the program is much easier to read. It is a good practice to split the program into several functions with self-describing names."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:49
|
|
#, no-wrap
|
|
msgid "Syntax"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:51
|
|
#, no-wrap
|
|
msgid ""
|
|
"result_type FunctionName(optional_parameters)\n"
|
|
"{\n"
|
|
"\tbody\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:56
|
|
#, no-wrap
|
|
msgid "Result <a cbot|type>type</a> should be <a cbot/void>void</a> if the function does not give any. Body is just a set of instructions. Function name must be created with the exact same rules applied to <a cbot|var>variables</a>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/function.txt:58
|
|
#, no-wrap
|
|
msgid "Parameters"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:59
|
|
#, no-wrap
|
|
msgid "A function can have parameters:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:61
|
|
#, no-wrap
|
|
msgid ""
|
|
"void Example(int a, float x, string s)\n"
|
|
"{\n"
|
|
"\tmessage(a);\n"
|
|
"\tmessage(x);\n"
|
|
"\tmessage(s);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:68
|
|
#, no-wrap
|
|
msgid "The <code>Example</code> function will receive an <a cbot|int>integer</a> <code>a</code>, a <a cbot|float>floating point number</a> <code>x</code> and a <a cbot|string>string</a> <code>s</code>. Parameters are \"passed by value\", that is the values of parameter variables in a function are copies of the values the caller specified as variables. If you pass an <code><a cbot|int>int</a></code> to a function, its parameter is a copy of whatever value was being passed as the argument, and the function can change its parameter value without affecting values in the code that invoked the function."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:70
|
|
#, no-wrap
|
|
msgid "If you pass a <a cbot|class>class</a> instance or an <a cbot|array>array</a> as parameter to a function, the function only receives a <a cbot|pointer>reference</a> to the instance or the array. That means if you modify the instance or the array in the function, the instance or the array that has been specified by the caller will be actually modified."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/function.txt:72
|
|
#, no-wrap
|
|
msgid "Result"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:73
|
|
#, no-wrap
|
|
msgid "A function can also return a result with the <code><a cbot|return>return</a></code> instruction. Therefore the function must be declared no longer as <code><a cbot|void>void</a></code> but as an other <a cbot|type>type</a>:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:75
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Average(float a, float b)\n"
|
|
"{\n"
|
|
"\treturn (a+b)/2;\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test( )\n"
|
|
"{\n"
|
|
"\tfloat value;\n"
|
|
"\tvalue = Average(2, 6);\n"
|
|
"\tmessage(value); // will display 4\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:87
|
|
#, no-wrap
|
|
msgid "Some other examples:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:89
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Pi()\n"
|
|
"{\n"
|
|
"\treturn 3.1415;\n"
|
|
"}\n"
|
|
"\n"
|
|
"string Sign(float a)\n"
|
|
"{\n"
|
|
"\tif (a > 0) return \"positive\";\n"
|
|
"\tif (a < 0) return \"negative\";\n"
|
|
"\treturn \"null\";\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:102
|
|
#, no-wrap
|
|
msgid "Overloading"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:103
|
|
#, no-wrap
|
|
msgid "You can declare several functions with the same name but different parameters:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:105
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Pythagoras(float a, float b)\n"
|
|
"{\n"
|
|
"\treturn sqrt((a*a)+(b*b));\n"
|
|
"}\n"
|
|
"\n"
|
|
"float Pythagoras(float a, float b, float c)\n"
|
|
"{\n"
|
|
"\treturn sqrt((a*a)+(b*b)+(c*c));\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:115
|
|
#, no-wrap
|
|
msgid "CBOT will call either the one or the other function depending on the parameters passed. They must be distinguishable, i.e. you can't declare two functions with the same name and parameter types in the exact same order, e.g. declaring <code>int Pythagoras(float b, float a)</code> will result in error. Note that result type does not matter."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:120
|
|
#, no-wrap
|
|
msgid "object::"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:121
|
|
#, no-wrap
|
|
msgid "Declaring a function as a part of the <a cbot|object>object</a> namespace gives it access to <code><a cbot|this>this</a></code> <a cbot|pointer>pointer</a>, in other words, to all available properties of the robot which the program is run on."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:123
|
|
#, no-wrap
|
|
msgid ""
|
|
"void object::Example()\n"
|
|
"{\n"
|
|
"\tmessage(this.category);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:2
|
|
#, no-wrap
|
|
msgid "Use this type for variables that contain the characteristics of an object, be it a bot, a building, some raw material, an enemy, etc. Here are all properties of an object: "
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|int>int</a> object.category </code><a cbot|category>Category</a> of the object\n"
|
|
"<code><a cbot|point>point</a> object.position </code>Position of the object (x,y,z)\n"
|
|
"<code><a cbot|float>float</a> object.orientation </code>Orientation of the object (0..360)\n"
|
|
"<code><a cbot|float>float</a> object.pitch </code>Forward/backward angle of the object\n"
|
|
"<code><a cbot|float>float</a> object.roll </code>Right/left angle of the object \n"
|
|
"<code><a cbot|float>float</a> object.energyLevel </code>Energy level (0..1)\n"
|
|
"<code><a cbot|float>float</a> object.shieldLevel </code>Shield level (0..1)\n"
|
|
"<code><a cbot|float>float</a> object.temperature </code>Jet temperature (0..1)\n"
|
|
"<code><a cbot|float>float</a> object.altitude </code>Altitude above ground\n"
|
|
"<code><a cbot|float>float</a> object.lifeTime </code>Lifetime of the object\n"
|
|
"<code>object object.energyCell </code>Power cell on the bot\n"
|
|
"<code>object object.load </code>Object carried by the bot\n"
|
|
"<code><a cbot|int>int</a> object.team </code>The object's team (see <a battles>code battles</a>)\n"
|
|
"<code><a cbot|point>point</a> object.velocity </code>Velocity of the object"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:19
|
|
#, no-wrap
|
|
msgid "Also, some objects have additional methods (instructions). See them in <a cbot>the main list</a> in the <c/>\"Instructions specific for some objects\" section."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:22
|
|
#, no-wrap
|
|
msgid "The <n/><a cbot|category>category</a> of an object allows you to know what it is, f. ex. what kind of bot, building, enemy, etc."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:60
|
|
#, no-wrap
|
|
msgid "<code>team</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:61
|
|
#, no-wrap
|
|
msgid "The bot's team. Used in <a battles>code battles</a>. If the object has no team assigned (e.g. in no team-based levels, the object being a resource), this is equal to <code>0</code>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/object.txt:63
|
|
#, no-wrap
|
|
msgid "<code>velocity</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/object.txt:64
|
|
#, no-wrap
|
|
msgid "Current velocity of the object. Should be treated as a three-dimensional vector."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/pencolor.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>pencolor</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/pencolor.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>pencolor ( color );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pencolor.txt:4
|
|
#, no-wrap
|
|
msgid "The instruction <c/>pencolor();<n/> instructs the bot to change the color of the pencil."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/pencolor.txt:6 ../E/pendown.txt:6
|
|
#, no-wrap
|
|
msgid "color: <code><a cbot|int>int</a></code> (default value: <code>Black</code>)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pencolor.txt:7 ../E/pendown.txt:7
|
|
#, no-wrap
|
|
msgid "<a cbot|colors>Color name</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pencolor.txt:10
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>pencolor();<n/>.\n"
|
|
"<code>== 0 </code>The color was changed\n"
|
|
"<code>!= 0 </code>The instruction did not work"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/pendown.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>pendown</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/pendown.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>pendown ( color, width );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pendown.txt:4
|
|
#, no-wrap
|
|
msgid "The instruction <c/>pendown();<n/> instructs the bot to have the pen down, so it starts drawing."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/pendown.txt:9
|
|
#, no-wrap
|
|
msgid "width: <code><a cbot|float>float</a></code> (default value: <code>0.5</code>)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pendown.txt:10 ../E/penwidth.txt:7
|
|
#, no-wrap
|
|
msgid "Width of the pen. The width cannot be higher than <code>1.0</code> and cannot be lower than <code>0.0</code>. Passing a higher value will result in the width being the highest possible and passing a lower value will result in the width being the lowest possible."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pendown.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>pendown();<n/>.\n"
|
|
"<code>== 0 </code>The pen is now down\n"
|
|
"<code>!= 0 </code>The instruction did not work"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/penup.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>penup</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/penup.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>penup ( );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/penup.txt:4
|
|
#, no-wrap
|
|
msgid "The instruction <c/>penup();<n/> instructs the bot to have the pen up, so it stops drawing. The pen is up by default, so it should be used only after using <code><a cbot|pendown>pendown</a></code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/penup.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>penup();<n/>.\n"
|
|
"<code>== 0 </code>The pen is now up\n"
|
|
"<code>!= 0 </code>The instruction did not work"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/penwidth.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>penwidth</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/penwidth.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>penwidth ( color );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/penwidth.txt:4
|
|
#, no-wrap
|
|
msgid "The instruction <c/>penwidth();<n/> instructs the bot to change the width of the pencil."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/penwidth.txt:6
|
|
#, no-wrap
|
|
msgid "width: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/penwidth.txt:10
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>penwidth();<n/>.\n"
|
|
"<code>== 0 </code>The width was changed\n"
|
|
"<code>!= 0 </code>The instruction did not work"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/pow.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>pow</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/pow.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>pow ( x, y );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pow.txt:6
|
|
#, no-wrap
|
|
msgid "Base."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pow.txt:9
|
|
#, no-wrap
|
|
msgid "Exponent."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/pow.txt:12
|
|
#, no-wrap
|
|
msgid "x to the y (x raised to the yth power)."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/radar.txt:15
|
|
#, no-wrap
|
|
msgid "<c/>radar ( cat, angle, focus, min, max, sens, filter );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/radar.txt:24
|
|
#, no-wrap
|
|
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:25 ../E/search.txt:10
|
|
#, no-wrap
|
|
msgid "<c/><s/>int bots[4];"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/radar.txt:26
|
|
#, no-wrap
|
|
msgid ""
|
|
"bots[0] = WheeledGrabber;\n"
|
|
"bots[1] = TrackedGrabber;\n"
|
|
"bots[2] = WingedGrabber;\n"
|
|
"bots[3] = LeggedGrabber;\n"
|
|
"object nearestGrabber = radar(bots);<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/radar.txt:31
|
|
#, no-wrap
|
|
msgid "Keyword <format const>Any</format> if you are looking for any object (including even plants and so on). Filters may be useful to use with this keyword."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:33
|
|
#, no-wrap
|
|
msgid "angle: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:39
|
|
#, no-wrap
|
|
msgid "focus: <code><a cbot|float>float</a></code> (default value: <code>360</code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:42
|
|
#, no-wrap
|
|
msgid "min: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:45
|
|
#, no-wrap
|
|
msgid "max: <code><a cbot|float>float</a></code> (default value: <code>1000</code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:48
|
|
#, no-wrap
|
|
msgid "sens: <code><a cbot|float>float</a></code> (default value: <code>1</code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/radar.txt:51
|
|
#, no-wrap
|
|
msgid "filter: <code><a cbot|int>int</a></code> (default value: <code><format const>FilterNone</format></code>)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:52
|
|
#, no-wrap
|
|
msgid "Determines which type of objects should be detected. Especially useful in use with an <a cbot|array>array</a> or <format const>Any</format>. The following filters are available:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:54
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>FilterNone</format> </code>Detects everything (default)\n"
|
|
"<code><format const>FilterOnlyLanding</format> </code>Detects only objects being on the ground\n"
|
|
"<code><format const>FilterOnlyFlying</format> </code>Detects only objects not being on the ground\n"
|
|
"<code><format const>FilterFriendly</format> </code>Detects only allies (objects in the same team)\n"
|
|
"<code><format const>FilterEnemy</format> </code>Detects only enemies (objects in an other team except neutral)\n"
|
|
"<code><format const>FilterNeutral</format> </code>Detects only neutral objects (e.g. resources)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:61
|
|
#, no-wrap
|
|
msgid "The last three are mainly useful in <a battles>code battles</a>. You can also pass a team ID to search only for objects from a specific team. Attention: you should use <format const>FilterNeutral</format> instead of <code>0</code> or else it will not work."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:63
|
|
#, no-wrap
|
|
msgid "Filters and IDs can be mixed using bitwise OR operator <code>|</code>, for example <c/>radar(Any, 0, 360, 0, 1000, 1, 2 | FilterOnlyLanding);<n/> will only detect an object from team <code>2</code> that is on the ground. Attention: you can specify only one team ID at once, but you can specify several filters at once."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/rand.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>rand</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/rand.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>rand ( );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/rand.txt:6
|
|
#, no-wrap
|
|
msgid "Pseudorandom number between 0 and 1 (including 0, but excluding 1)."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/research.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>research</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/research.txt:3
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|object>object</a>.research ( type );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/research.txt:5
|
|
#, no-wrap
|
|
msgid "Starts a <a cbot|researches>research</a> of the given type."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/research.txt:8
|
|
#, no-wrap
|
|
msgid "<a object|research>ResearchCenter</a> or <a object|labo>AutoLab</a>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/research.txt:10
|
|
#, no-wrap
|
|
msgid "type: <code><a cbot|int>int</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/research.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>research()</code>.\n"
|
|
"<code>== 0 </code>The research successfully started\n"
|
|
"<code>!= 0 </code>The research could not be started (e.g. the research is disabled in the level, no power cell)"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/research.txt:19
|
|
#, no-wrap
|
|
msgid "<a cbot|researches>Research names</a>, <a cbot|canresearch>canresearch</a>, <a cbot|researched>researched</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/researched.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>researched</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/researched.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>researched ( research );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researched.txt:5
|
|
#, no-wrap
|
|
msgid "Checks if the <a cbot|researches>research</a> was done in the level."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researched.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"<format const>true</format> if the research was done\n"
|
|
"<format const>false</format> if the research was not done"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researched.txt:15
|
|
#, no-wrap
|
|
msgid "<a cbot|researches>Research names</a>, <a cbot|research>research</a>, <a cbot|canresearch>canresearch</a>, <a cbot|canbuild>canbuild</a> <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/researches.txt:1
|
|
#, no-wrap
|
|
msgid "Value <code>Research names</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:2
|
|
#, no-wrap
|
|
msgid "Research names represent the types of available researches in the CBOT language. You can use them to control <a object|research>ResearchCenter</a> by passing them to appropriate instructions (e.g. <a cbot|research>research</a>, <a cbot|canresearch>canresearch</a>, <a cbot|researched>researched</a>)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:4
|
|
#, no-wrap
|
|
msgid "In a program, research names are always displayed on a <format const>red background</format>. If a research name is not highlighted in red, it is misspelled. Caps and lower cases should be kept as is."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:6
|
|
#, no-wrap
|
|
msgid "Below are the different research names available."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/researches.txt:8
|
|
#, no-wrap
|
|
msgid "Done by <a object|research>ResearchCenter</a>:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>ResearchTracked</format> </code>Tracked bots (e.g. <a object|botgc>tracked grabber</a>)\n"
|
|
"<code><format const>ResearchWinged</format> </code>Winged bots (e.g. <a object|botgj>winged grabber</a>)\n"
|
|
"<code><format const>ResearchShooter</format> </code>Bots with cannon (e.g. <a object|botfc>tracked shooter</a>)\n"
|
|
"<code><format const>ResearchPhazerShooter</format> </code><a object|botphaz>Phazer shooter</a>\n"
|
|
"<code><format const>ResearchThumper</format> </code><a object|bottump>Thumper</a>\n"
|
|
"<code><format const>ResearchShielder</format> </code><a object|botshld>Shielder</a>\n"
|
|
"<code><format const>ResearchDefenseTower</format> </code><a object|tower>Defense tower</a>\n"
|
|
"<code><format const>ResearchNuclearPlant</format> </code><a object|nuclear>Nuclear plant</a>"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/researches.txt:18
|
|
#, no-wrap
|
|
msgid "Done by <a object|labo>AutoLab</a>:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:19
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>ResearchLegged</format> </code>Legged bots (e.g. <a object|botgs>legged grabber</a>)\n"
|
|
"<code><format const>ResearchOrgaShooter</format> </code>Bots with orgaball cannon (e.g. <a object|botoc>tracked orga shooter</a>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/researches.txt:22
|
|
#, no-wrap
|
|
msgid "Impossible to research:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:23
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><format const>ResearchSniffer</format> </code>Sniffers (e.g. <a object|botsc>tracked sniffer</a>)\n"
|
|
"<code><format const>ResearchSubber</format> </code><a object|botsub>Subber</a>\n"
|
|
"<code><format const>ResearchRecycler</format> </code><a object|botrecy>Recycler</a>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/researches.txt:28
|
|
#, no-wrap
|
|
msgid "<a cbot>CBOT Language</a>, <a cbot|type>variables</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/round.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>round</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/round.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>round ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/round.txt:4
|
|
#, no-wrap
|
|
msgid "Rounds a number."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/round.txt:10
|
|
#, no-wrap
|
|
msgid "Rounded <code>value</code>. For example, <code>round(2.5)</code> is <code>3.0</code>, whereas <code>round(2.4)</code> is <code>2.0</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/round.txt:13
|
|
#, no-wrap
|
|
msgid "<a cbot|trunc>trunc</a>, <a cbot|floor>floor</a>, <a cbot|ceil>ceil</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/search.txt:5
|
|
#, no-wrap
|
|
msgid "Detects the object of the given category that is closest to the given position. Similar to <c/><a cbot|radar>radar();</a><n/>, but can search starting from the specific point instead of the actual bot's position."
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/search.txt:8
|
|
#, no-wrap
|
|
msgid "<a cbot|category>Category</a> of the objects that should be detected. For example, when you are looking for an ant, write <code>search(AlienAnt)</code>. "
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/search.txt:9
|
|
#, no-wrap
|
|
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers, starting from a certain point in the level:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/search.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"bots[0] = WheeledGrabber;\n"
|
|
"bots[1] = TrackedGrabber;\n"
|
|
"bots[2] = WingedGrabber;\n"
|
|
"bots[3] = LeggedGrabber;\n"
|
|
"point p(50, 24, 0);\n"
|
|
"object grabberNearestThePoint = search(bots, p);<n/>"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/search.txt:19
|
|
#, no-wrap
|
|
msgid "position: <code><a cbot|point>point</a></code> (default value: <code><a cbot|this>this</a>.<a cbot|object>position</a></code>)"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/sin.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>sin</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/sin.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>sin ( angle );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/sin.txt:9
|
|
#, no-wrap
|
|
msgid "Sine of the angle."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/sqrt.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>sqrt</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/sqrt.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>sqrt ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/sqrt.txt:6
|
|
#, no-wrap
|
|
msgid "Non-negative number."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/sqrt.txt:9
|
|
#, no-wrap
|
|
msgid "Square root of the value."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/switch.txt:1
|
|
#, no-wrap
|
|
msgid "Instructions <code>switch</code>, <code>case</code> and <code>default</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:2
|
|
#, no-wrap
|
|
msgid "With the instruction <code>switch() {}</code> you can execute a proper set of instructions (a case) basing on some value."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:5
|
|
#, no-wrap
|
|
msgid "Note: the <a cbot|busy>busy</a> instruction might be much better to use in this scenario."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:7
|
|
#, no-wrap
|
|
msgid "See the following <a cbot|function>function</a>: the bot will be <a cbot|wait>waiting</a> a proper amount of time for a certain task to be completed:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/switch.txt:9
|
|
#, no-wrap
|
|
msgid ""
|
|
"public void WaitForTaskCompleted(object building)\n"
|
|
"{\n"
|
|
"\tint cat = building.category;\n"
|
|
"\t<a cbot|if>if</a> (cat == Converter) wait(15);\n"
|
|
"\telse if (cat == BotFactory) wait(15);\n"
|
|
"\telse if (cat == PowerPlant) wait(12);\n"
|
|
"\telse message(\"Undefined wait time\", DisplayError);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:18
|
|
#, no-wrap
|
|
msgid "This function can be also written using the <code>switch() {}</code> instruction:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/switch.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"public void WaitForTaskCompleted(object building)\n"
|
|
"{\n"
|
|
"\tswitch (building.category)\n"
|
|
"\t{\n"
|
|
"\t\tcase Converter: wait(15); break;\n"
|
|
"\t\tcase BotFactory: wait(15); break;\n"
|
|
"\t\tcase PowerPlant: wait(12); break;\n"
|
|
"\t\tdefault: message(\"Undefined wait time\", DisplayError);\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:31
|
|
#, no-wrap
|
|
msgid "Which way to write this kind of choice structures, is a matter of taste."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:33
|
|
#, no-wrap
|
|
msgid "You can also make cases like this:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/switch.txt:35
|
|
#, no-wrap
|
|
msgid ""
|
|
"switch (building.category)\n"
|
|
"{\n"
|
|
"\tcase Converter:\n"
|
|
"\tcase BotFactory:\n"
|
|
"\t\twait(15); break;\n"
|
|
"\tcase PowerPlant: wait(12); break;\n"
|
|
"\tdefault: message(\"Undefined wait time\", DisplayError);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:44
|
|
#, no-wrap
|
|
msgid "<a object|convert>Converter</a> and <a object|factory>bot factory</a> have the same waiting time, so in order to not write the same instructions twice, we made multiple cases run the same code. In fact, all code after the highest case used will be executed if we do not <code><a cbot|break>break</a></code> it."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/switch.txt:48
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>switch ( value )\n"
|
|
"{\n"
|
|
"\tcase value1: instructions1\n"
|
|
"\tcase value2: instructions2\n"
|
|
"\t...\n"
|
|
"\tcase valueN: instructionsN\n"
|
|
"\tdefault: instructionsDefault\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:57
|
|
#, no-wrap
|
|
msgid "With this conditional structure you can execute <code>instructions1</code> or <code>instructions2</code> ... or <code>instructionsN</code> or <code>instructionsDefault</code> depending on the <code>value</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:59
|
|
#, no-wrap
|
|
msgid ""
|
|
"If the <code>value</code> is equal to <code>value1</code>, <code>instructions1</code> to <code>N</code> (including <code>instructionsDefault</code>) are executed.\n"
|
|
"If the <code>value</code> is equal to <code>value2</code>, <code>instructions2</code> to <code>N</code> (including <code>instructionsDefault</code>) are executed.\n"
|
|
"And so on.\n"
|
|
"If the <code>value</code> is equal to <code>valueN</code>, <code>instructionsN</code> and <code>instructionsDefault</code> are executed.\n"
|
|
"If the <code>value</code> is not equal to any value in the given cases, <code>instructionsDefault</code> are executed."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:65
|
|
#, no-wrap
|
|
msgid "You can exit from the the <code>switch() {}</code> instruction using <code><a cbot|break>break</a></code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/switch.txt:68
|
|
#, no-wrap
|
|
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the <code>switch ( ) { }</code> instruction."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/takeoff.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>takeoff</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/takeoff.txt:3
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|object>object</a>.takeoff ( );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/takeoff.txt:5
|
|
#, no-wrap
|
|
msgid "Takes off the spaceship."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/takeoff.txt:8
|
|
#, no-wrap
|
|
msgid "<a object|base>SpaceShip</a>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/takeoff.txt:11
|
|
#, no-wrap
|
|
msgid ""
|
|
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>takeoff()</code>.\n"
|
|
"<code>== 0 </code>Spaceship takes off\n"
|
|
"<code>!= 0 </code>Spaceship could not take off (e.g. mission is not finished yet)"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/tan.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>tan</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/tan.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>tan ( angle );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/tan.txt:6
|
|
#, no-wrap
|
|
msgid "Angle in degrees (except multiples of 90)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/tan.txt:9
|
|
#, no-wrap
|
|
msgid "Tangent of the angle."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/trunc.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>trunc</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/trunc.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>trunc ( value );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/trunc.txt:4
|
|
#, no-wrap
|
|
msgid "Truncation is a method of approximating a decimal number by dropping all decimal places past a certain point without rounding. For positive numbers, it works like the <c/><a cbot|floor>floor();</a><n/> function, and for negative numbers, it works like the <c/><a cbot|ceil>ceil();</a><n/> function. It can be said that it rounds towards zero."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/trunc.txt:10
|
|
#, no-wrap
|
|
msgid "Truncated <code>value</code>. For example, <code>trunc(-2.5)</code> is <code>-2.00</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:4
|
|
#, no-wrap
|
|
msgid "In a program, categories are always displayed like that: <format const>category</format>. If a category isn't highlighted, it is misspelled. Caps and lower cases should be kept as is."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/type.txt:9
|
|
#, no-wrap
|
|
msgid "In a program, the name of a type is always displayed like that: <format type>type</format>. If the name of a type is not highlighted, this means that the name is misspelled. Type names are always written with lower case characters. Here is a list of the different types: "
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/produce.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>produce</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/produce.txt:3
|
|
#, no-wrap
|
|
msgid "<c/>produce ( position, orientation, category, program, power );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/produce.txt:4
|
|
#, no-wrap
|
|
msgid "r"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/produce.txt:5
|
|
#, no-wrap
|
|
msgid "<c/>produce ( category, power );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:7
|
|
#, no-wrap
|
|
msgid "Immediately creates an <a cbot|category>object</a>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/produce.txt:12
|
|
#, no-wrap
|
|
msgid "orientation: <code><a cbot|float>float</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:13
|
|
#, no-wrap
|
|
msgid "Orientation (angle) of the object."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:16
|
|
#, no-wrap
|
|
msgid "<a cbot|category>Category</a> of the object."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/produce.txt:18
|
|
#, no-wrap
|
|
msgid "program: <code><a cbot|string>string</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:22
|
|
#, no-wrap
|
|
msgid "Energy level."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/produce.txt:24
|
|
#, no-wrap
|
|
msgid "Return: <code><a cbot|void>void</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:25
|
|
#, no-wrap
|
|
msgid "Nothing."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/produce.txt:27
|
|
#, no-wrap
|
|
msgid "Example usage"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:28
|
|
#, no-wrap
|
|
msgid "It is used by <a object|mother>AlienQueen</a> to produce <a object|egg>AlienEggs</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:10
|
|
#, no-wrap
|
|
msgid "Where object will be created. The second syntax creates the object at the current bot's position."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/produce.txt:19
|
|
#, no-wrap
|
|
msgid "Program for the object. Will have effect only for programmable objects like robots or aliens."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:2
|
|
#, no-wrap
|
|
msgid "Expressions are used for various calculations with many different variables, which return the desired result. What distinguishes them from standard instructions are operators, which are described below."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:8
|
|
#, no-wrap
|
|
msgid "Binary operations"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:9
|
|
#, no-wrap
|
|
msgid "Assuming that <code>a</code>, <code>b</code> can be values of declared and initialized variables of types <code>t1</code> and <code>t2</code>, the binary operations can be described as follows:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:10
|
|
#, no-wrap
|
|
msgid "<code>r = a op b</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:11
|
|
#, no-wrap
|
|
msgid "Where <code>r</code> is the result of the operation and <code>op</code> is a binary operator which works with values of types <code>t1</code> and <code>t2</code>."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:13
|
|
#, no-wrap
|
|
msgid "Order of operations"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:14
|
|
#, no-wrap
|
|
msgid "Let <code>a op1 b op2 c</code> be a legal expression, then the following rules apply:"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/expr.txt:15
|
|
#, no-wrap
|
|
msgid "If <code>op1 == op2</code> or <code>op1</code> is as strong as <code>op2</code> or <code>op1</code> is stronger than <code>op2</code>, first calculate <code>a op1 b</code> and store its result in a temporary variable <code>r</code>, then calculate <code>r op2 c</code>, which is the final result of the expression."
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/expr.txt:16
|
|
#, no-wrap
|
|
msgid "If <code>op1</code> is weaker than <code>op2</code>, first calculate <code>b op2 c</code> and store its result in a temporary variable <code>r</code>, then calculate <code>a op1 r</code>, which is the final result of the expression."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:18
|
|
#, no-wrap
|
|
msgid "Note: an operation can be made stronger by surrounding it in brackets, so for example assuming that <code>op1</code> is weaker than <code>op2</code>, in an expression <code>(a op1 b) op2 c</code> the <code>a op1 b</code> operation will be executed first."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:20
|
|
#, no-wrap
|
|
msgid "Tip: always use brackets if you are not sure about the order of operations, do not try to remember how strong are each of the operators. Generally it should be fairly obvious."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"Here is a complicated example, which uses arithemtic operations described below, showing how expressions are calculated:\n"
|
|
"<c/>Assume a, b, c, d, x, y, z, e are all initialized variables of type float or int. Then the following expression should be calculated the following way:\n"
|
|
" a * b + c - d / x % (y * z) - e =\n"
|
|
"= r1 + c - d / x % (y * z) - e = , r1 = a * b\n"
|
|
"= r2 - d / x % (y * z) - e = , r2 = r1 + c\n"
|
|
"= r2 - r3 % (y * z) - e = , r3 = d / x\n"
|
|
"= r2 - r3 % r4 - e = , r4 = y * z\n"
|
|
"= r2 - r5 - e = , r5 = r3 % r4\n"
|
|
"= r6 - e = , r6 = r2 - r5\n"
|
|
"= r7 , r7 = r6 - e\n"
|
|
"r7 is the final result of this expression."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:35
|
|
#, no-wrap
|
|
msgid "Assignment operator"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:36
|
|
#, no-wrap
|
|
msgid "<code>=</code> is the assignment operator. It is used to store the result of an expression in a variable."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:38
|
|
#, no-wrap
|
|
msgid "On the left side of this operator there must be so called l-value and on the right side - r-value. L-values are just <a cbot|var>variables</a><n/>, r-values are expressions or just usual values. This makes the assignment operator kind of special, because what is l-value is pretty restrictive (it cannot be an expression, constant and so on, only single variable). Also, the type of l-value must match the type of r-value (unless a conversion is possible, for example assigning a <code><a cbot|float>float</a></code> to <code><a cbot|int>int</a></code>)."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:42
|
|
#, no-wrap
|
|
msgid ""
|
|
" float a;\n"
|
|
" float b = 2.0 * (a = 4.0); // b == 8.0"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:45
|
|
#, no-wrap
|
|
msgid "This example is actually really confusing, but this property is actually useful, because it lets doing something like this:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:47
|
|
#, no-wrap
|
|
msgid ""
|
|
" float a, b, c, d, e;\n"
|
|
" a = b = c = d = e = 1.0; // a == b == c == d == e == 1.0"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:50
|
|
#, no-wrap
|
|
msgid "Basic arithmetic operations"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:51
|
|
#, no-wrap
|
|
msgid "Binary operators below are working with fundamental number types (<code><a cbot|int>int</a></code>, <code><a cbot|float>float</a></code>)."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 ../E/expr.txt:140 ../E/expr.txt:163
|
|
#, no-wrap
|
|
msgid "List"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:54
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>+</code> addition\n"
|
|
"<code>-</code> subtraction\n"
|
|
"<code>*</code> multiplication\n"
|
|
"<code>/</code> division\n"
|
|
"<code>%</code> remainder of the division (only for the type <code><a cbot|int>int</a></code>)"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:60
|
|
#, no-wrap
|
|
msgid "Notes"
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/expr.txt:61
|
|
#, no-wrap
|
|
msgid "The <code>*</code>, <code>/</code>, <code>%</code> are all stronger than <code>+</code> and <code>-</code>."
|
|
msgstr ""
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../E/expr.txt:62
|
|
#, no-wrap
|
|
msgid "The result <a cbot|type>type</a> is always <code><a cbot|float>float</a></code>. If <code>a</code> or <code>b</code> are of type <code><a cbot|int>int</a></code>, they are automatically converted to <code><a cbot|float>float</a></code>. Note: this means that results of intermediate calculations tends to be as precise as possible, the precision is lost only during converting the final (<code><a cbot|float>float</a></code>) result to <code><a cbot|int>int</a></code>, for example by the assignment <code>=</code> operator."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:64
|
|
#, no-wrap
|
|
msgid "Real life examples"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:81
|
|
#, no-wrap
|
|
msgid "Compound assignment operators"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:82
|
|
#, no-wrap
|
|
msgid "Besides the <code>=</code> operator for variable assignment there are several compound-assignment operators."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:84
|
|
#, no-wrap
|
|
msgid "The compound-assignment operators combine the <code>=</code> assignment operator with another binary operator such as <code>+</code> or <code>-</code>. Compound-assignment operators perform the operation specified by the additional operator and then assign the result to the left operand. For example, a compound-assignment expression such as"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:85
|
|
#, no-wrap
|
|
msgid "<code>lvalue += expression</code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:87
|
|
#, no-wrap
|
|
msgid "<code>lvalue = lvalue + expression</code>"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:96
|
|
#, no-wrap
|
|
msgid "String concatenation"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:97
|
|
#, no-wrap
|
|
msgid "If at least one of the values used with the <code>+</code> operator is a <a cbot|string>string</a>, then the operation of concatenation is performed. The result of the operator is then a string, which is created by joining end-to-end the string and the other value. If the other value is not a string, then it is converted to string beforehand."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:101
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tstring s = \"a\" + \"bc\"; // returns \"abc\"\n"
|
|
"\tstring s = 1 + \"bc\"; // returns \"1bc\"\n"
|
|
"\tstring s = 2.5 + \"bc\"; // returns \"2.5bc\"\n"
|
|
"\tstring s = \"a\" + true; // returns \"atrue\""
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:106
|
|
#, no-wrap
|
|
msgid "Tip: the properties of the concatenation <code>+</code> operator is useful with the <a cbot|message>message();</a> function, because it does not work with other types than string. An empty string can be used together with a value in order to create a string, which actually can be passed to the <a cbot|message>message();</a> function:"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:177
|
|
#, no-wrap
|
|
msgid "Prefix and postfix increment- and decrement operators"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:180
|
|
#, no-wrap
|
|
msgid "For example to increment the variable <code>a</code> you can write"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:181
|
|
#, no-wrap
|
|
msgid "<c/>a++;<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:182
|
|
#, no-wrap
|
|
msgid "instead of"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:183
|
|
#, no-wrap
|
|
msgid "<c/>a = a + 1;<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:185
|
|
#, no-wrap
|
|
msgid "The result of the operation <code>a++</code> is the value of the variable <code>a</code> *before* the increment. If you use the prefix operator <code>++a</code> the result of the operation is the value of the variable <code>a</code> *after* the increment. The same holds for the <code>--</code> decrement operator."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:4
|
|
#, no-wrap
|
|
msgid "Specifically speaking, an expression is an ordered series of operations which yield a result. Operations consist of operators, which are special <a cbot|function>functions</a> <code>T f(t1 x1, t2 x2, ..., tn xn)</code>, where <code>xi</code> is a value of type <code>ti</code>, and <code>T</code> is the result type. For example, <code>float +(float a, float b)</code> returns a sum of values <code>a</code> and <code>b</code>. Note: Operators are a part of the CBOT language and they cannot be defined in program. Also, the operators cannot be used as usual <a cbot|function>functions</a>, they need to be written using a special notation depending on the operator, for example <code>a+b</code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:6
|
|
#, no-wrap
|
|
msgid "In nearly all operations, <a cbot>constants</a>, <a cbot|var>variables</a>, <a cbot|function>functions</a> returning non-<a cbot|void>void</a> type and also other operations can be used as values."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:40
|
|
#, no-wrap
|
|
msgid "Note: it may be not obvious at first, but notice that <code>=</code> is an *operator* not an instruction. This mean that it can be used in the middle of an other expression! The result of <code>=</code> is the value which was assigned to the l-value - the result of the expression on the right. Example:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:66
|
|
#, no-wrap
|
|
msgid ""
|
|
" int i = 12 + 3; // i == 15\n"
|
|
" int i = 2 - 5; // i == -3\n"
|
|
" \n"
|
|
" float f = 3.01 * 10; // f == 30.1\n"
|
|
" \n"
|
|
" int i = 5 / 3; // i == 1 (automatic conversion to int)\n"
|
|
" float f = 5 / 3; // f == 1.67\n"
|
|
" float f = 5 / 0; // returns an error (division by zero)\n"
|
|
" \n"
|
|
" int i = 13 % 5; // i == 3\n"
|
|
" int i = -8 % 3; // i == -2\n"
|
|
" \n"
|
|
" float f = sin(90) * i; // f == -2.0\n"
|
|
" "
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:108
|
|
#, no-wrap
|
|
msgid ""
|
|
" float pi = 3.14;\n"
|
|
" // message(pi); // does not work\n"
|
|
" message(\"\"+pi);"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:189
|
|
#, no-wrap
|
|
msgid ""
|
|
" a = 2;\n"
|
|
" b = a++;\n"
|
|
" // now b contains 2 and a contains 3"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:193
|
|
#, no-wrap
|
|
msgid ""
|
|
" a = 2;\n"
|
|
" b = ++a;\n"
|
|
" // now b contains 3 and a contains 3"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:137
|
|
#, no-wrap
|
|
msgid "Logical operators"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:138
|
|
#, no-wrap
|
|
msgid "Logical operators work with values of type <a cbot|bool>bool</a> and they always return a <a cbot|bool>bool</a>. They are mainly used in <a cbot|cond>conditions</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:150
|
|
#, no-wrap
|
|
msgid "Ternary operator"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:151
|
|
#, no-wrap
|
|
msgid ""
|
|
"The ternary operator is nothing more than a syntax sugar. It is also known as \"inline if\". It might be confusing at first, because its syntax is a little more complicated than other operators. It can be described as follows:\n"
|
|
"<code>(condition) ? (result when true) : (result when false)</code>\n"
|
|
"Brackets are not needed."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:155
|
|
#, no-wrap
|
|
msgid "Firstly, the condition is valued and then the first result is returned if the condition is true, otherwise the second result is returned."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
|
|
#, no-wrap
|
|
msgid "Example"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/expr.txt:158
|
|
#, no-wrap
|
|
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/cond.txt:2
|
|
#, no-wrap
|
|
msgid "A condition is a special <a cbot|expr>expression</a> that returns a <a cbot|bool>boolean</a> value, that can only be either <code><a cbot|true>true</a></code> or <code><a cbot|false>false</a></code>. With a condition, you can choose f. ex. if the instructions in a <code><a cbot|while>while</a></code> loop must be repeated again, or if the instruction in a <code><a cbot|if>if</a></code> bloc must be executed."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:112
|
|
#, no-wrap
|
|
msgid "Comparison operators"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:113
|
|
#, no-wrap
|
|
msgid "Comparison operators work with values of type <a cbot|bool>float</a> and they always return a <a cbot|bool>bool</a>. They are mainly used in <a cbot|cond>conditions</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:141
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>!a </code>not <code>a</code>\n"
|
|
"<code>a && b </code><code>a</code> and <code>b</code>\n"
|
|
"<code>a || b </code><code>a</code> or <code>b</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:146
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>!false </code>returns true\n"
|
|
"<code>true && false </code>returns false \n"
|
|
"<code>true || false </code>returns true"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/expr.txt:160
|
|
#, no-wrap
|
|
msgid "Bitwise operators"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:161
|
|
#, no-wrap
|
|
msgid "Bitwise operators are similar to the logical operator, because they are operating on bits (which can be only 0 or 1, conditions can have a value only of false or true). So in theory, they should be working with basically any type of variable, because each value in the computer must be stored as a sequence of bits."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:164
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>a & b </code><code>a</code> AND <code>b</code>\n"
|
|
"<code>a | b </code><code>a</code> OR <code>b</code>\n"
|
|
"<code>a ^ b </code><code>a</code> XOR <code>b</code>\n"
|
|
"<code>a >> b </code>shift bits of <code>a</code> to the right <code>b</code> times\n"
|
|
"<code>a << b </code>shift bits of <code>a</code> to the left <code>b</code> times"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/expr.txt:171
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>2 & 1 </code>returns 0\n"
|
|
"<code>2 | 1 </code>returns 3\n"
|
|
"<code>2 ^ 2 </code>returns 0\n"
|
|
"<code>2 >> 1 </code>returns 1\n"
|
|
"<code>2 << 1 </code>returns 4"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:4
|
|
#, no-wrap
|
|
msgid ""
|
|
"int [ ] a; // an array of int\n"
|
|
"int a [12]; // an array of int limited to 12 elements\n"
|
|
"string s[3]; // an array of 3 strings\n"
|
|
"float xy[][]; // a 2 dimensionnal array of floats"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/array.txt:30
|
|
#, no-wrap
|
|
msgid "Initialization syntax"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/array.txt:31
|
|
#, no-wrap
|
|
msgid "You can initialize a new array using the following syntax:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:33
|
|
#, no-wrap
|
|
msgid "type arrayName[] = { value0, value1, value2, ..., valueN };"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/array.txt:37
|
|
#, no-wrap
|
|
msgid ""
|
|
"int numbers[] = { 10, 20, 30 };\n"
|
|
"MyClass objects[] = { new MyClass(1), new MyClass(2) };"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:2
|
|
#, no-wrap
|
|
msgid "With the instruction <c/>radar();<n/>, you can look for objects like <a object|mother>enemies</a>, bots, buildings or raw materials."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radar.txt:81
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|radarall>radarall</a>();<n/>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/radarall.txt:1
|
|
#, no-wrap
|
|
msgid "Instruction <code>radarall</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radarall.txt:2
|
|
#, no-wrap
|
|
msgid "<c/>radarall();<n/> is an enhancement of the <c/><a cbot|radar>radar</a>();<n/> function -- it detects all objects matching the given criteria."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/radarall.txt:4
|
|
#, no-wrap
|
|
msgid "Example<c/>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/radarall.txt:13
|
|
#, no-wrap
|
|
msgid "<c/>radarall ( cat, angle, focus, min, max, sens, filter );<n/>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radarall.txt:15
|
|
#, no-wrap
|
|
msgid "The function works generally the same as the <c/><a cbot|radar>radar</a>();<n/> function with the only difference being that it returns an <a cbot|array>array</a> of <a cbot|object>objects</a> instead of one object. If no object is found, <code><a cbot|null>null</a></code> is returned."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radarall.txt:17
|
|
#, no-wrap
|
|
msgid "The order of objects in the returned array is sorted by distance and depends on the <code>sens</code> parameter. The first object in the array is the object which would be returned by the <c/>radar();<n/> function called with the exactly same parameters."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/radarall.txt:20
|
|
#, no-wrap
|
|
msgid "<c/><a cbot|radar>radar</a>();<n/>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:11
|
|
#, no-wrap
|
|
msgid "This set of instructions is executed before the first loop instance."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:17
|
|
#, no-wrap
|
|
msgid "This set of instructions is executed at the end of every instance of the loop. "
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/for.txt:38
|
|
#, no-wrap
|
|
msgid "Executing more instructions"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:39
|
|
#, no-wrap
|
|
msgid "In the <code>before</code> and <code>end</code> part of a <code>for</code> loop you can specify more than one instruction by using comma. Example:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/for.txt:41
|
|
#, no-wrap
|
|
msgid ""
|
|
"int i = 0;\n"
|
|
"int j;\n"
|
|
"for (i++, j = 2; i < 3 && j > 0; i++, j--)\n"
|
|
"{\n"
|
|
" message(i);\n"
|
|
" message(j);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/for.txt:49
|
|
#, no-wrap
|
|
msgid "The output of the above code is <code>1 2 2 1</code>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/radarall.txt:5
|
|
#, no-wrap
|
|
msgid ""
|
|
"object[] items = radarall(PowerCell);\n"
|
|
"for (int i = 0; i < sizeof(items); ++i)\n"
|
|
"{\n"
|
|
" message(items[i].id);\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:103
|
|
#, no-wrap
|
|
msgid ""
|
|
" <code><a object|flag>BlueFlag</a> </code>Blue Flag\n"
|
|
" <code><a object|flag>RedFlag</a> </code>Red Flag\n"
|
|
" <code><a object|flag>GreenFlag</a> </code>Green Flag\n"
|
|
" <code><a object|flag>YellowFlag</a> </code>Yellow Flag\n"
|
|
" <code><a object|flag>VioletFlag</a> </code>Violet Flag\n"
|
|
" <code><a object|waypoint>WayPoint</a> </code>Checkpoint\n"
|
|
" <code><a object|target2>Target2</a> </code>Flying checkpoint\n"
|
|
" <code><a object|enerspot>PowerSpot</a> </code>Underground Energy Deposit\n"
|
|
" <code><a object|stonspot>TitaniumSpot</a> </code>Underground Titanium Deposit\n"
|
|
" <code><a object|uranspot>UraniumSpot</a> </code>Underground Uranium Deposit"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:10
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 176/> <code><a object|huston>Houston</a> </code>Mission Control\n"
|
|
"<button 171/> <code><a object|base>SpaceShip</a> </code>Spaceship\n"
|
|
"<button 160/> <code><a object|factory>BotFactory</a> </code>Robot Factory\n"
|
|
"<button 163/> <code><a object|research>ResearchCenter</a> </code>Research Center\n"
|
|
"<button 168/> <code><a object|radar>RadarStation</a> </code>Radar\n"
|
|
"<button 172/> <code><a object|exchange>ExchangePost</a> </code>Information Exchange Post\n"
|
|
"<button 169/> <code><a object|repair>RepairCenter</a> </code>Repair Center\n"
|
|
"<button 165/> <code><a object|tower>DefenseTower</a> </code>Defense Tower\n"
|
|
"<button 166/> <code><a object|labo>AutoLab</a> </code>Organic Matter Analyzer \n"
|
|
"<button 164/> <code><a object|station>PowerStation</a> </code>Power Station\n"
|
|
"<button 167/> <code><a object|energy>PowerPlant</a> </code>Power Cell Factory\n"
|
|
"<button 170/> <code><a object|nuclear>NuclearPlant</a> </code>Nuclear Plant\n"
|
|
"<button 162/> <code><a object|convert>Converter</a> </code>Titanium Converter\n"
|
|
"<button 161/> <code><a object|derrick>Derrick</a> </code>Derrick\n"
|
|
"<button 174/> <code><a object|captor>PowerCaptor</a> </code>Parabolic Lightning Conductor\n"
|
|
"<button 175/> <code><a object|safe>Vault</a> </code>Vault\n"
|
|
" <code><a object|start>StartArea</a> </code>Starting Pad\n"
|
|
" <code><a object|goal>GoalArea</a> </code>Finishing Pad\n"
|
|
" <code><a object|target1>Target1</a> </code>Flying target\n"
|
|
" <code><a object|nest>AlienNest</a> </code>Alien Nest"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:10
|
|
#, no-wrap
|
|
msgid "Classes can be only <a cbot|public>public</a>. This means that they can be used by all bots in a mission."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:12
|
|
#, no-wrap
|
|
msgid "Class Members"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:13
|
|
#, no-wrap
|
|
msgid "Class members are fields (<a cbot|var>variables</a>) and methods (<a cbot|function>functions</a>)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:15
|
|
#, no-wrap
|
|
msgid "For example, the following class dubbed <code>MyClass</code> contains 4 fields (<code>a</code>, <code>b</code>, <code>x</code> and <code>s</code>) and one method (<code>MyFunction</code>)."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:17
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint a, b;\n"
|
|
"\tfloat x = 3.33;\n"
|
|
"\tstring s = \"hello\";\n"
|
|
"\tfloat MyFunction(float value)\n"
|
|
"\t{\n"
|
|
"\t\treturn (value * x) - 1;\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/class.txt:55
|
|
#, no-wrap
|
|
msgid "Member Initialization"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:60
|
|
#, no-wrap
|
|
msgid "Example:<c/>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:61
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint a, b;\n"
|
|
"\tvoid MyClass()\n"
|
|
"\t{\n"
|
|
"\t\ta = 2; b = 3;\n"
|
|
"\t}\n"
|
|
"\tvoid MyClass(int a, int b)\n"
|
|
"\t{\n"
|
|
"\t\tthis.a = a; this.b = b;\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:76
|
|
#, no-wrap
|
|
msgid "As the names of the parameters of the second constructor are the same as the names of the two members <code>a</code> and <code>b</code>, we must use the <code><a cbot|this>this</a></code> <a cbot|pointer>reference</a> to avoid confusion with the parameters' names."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:78
|
|
#, no-wrap
|
|
msgid "Object Creation"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:79
|
|
#, no-wrap
|
|
msgid "You can create objects of type <code>YourClass</code> using the <code><a cbot|new>new</a></code> keyword. Example:"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:90
|
|
#, no-wrap
|
|
msgid "Object Destruction"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:114
|
|
#, no-wrap
|
|
msgid "Passing Objects to Functions"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:115
|
|
#, no-wrap
|
|
msgid "Objects in CBOT are passed by <a cbot|pointer>reference</a>. This means that when an object is passed to a <a cbot|function>function</a>, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:117
|
|
#, no-wrap
|
|
msgid "Inheritance"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:118
|
|
#, no-wrap
|
|
msgid "A class can inherit public and protected members of another class by using the <code><a cbot|extends>extends</a></code> keyword."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:2
|
|
#, no-wrap
|
|
msgid "This keyword allows you to create a class definition by using the following syntax:"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/class.txt:9
|
|
#, no-wrap
|
|
msgid "All Classes Are Public"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/class.txt:52
|
|
#, no-wrap
|
|
msgid "Class Members Modifiers"
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/class.txt:75
|
|
#, no-wrap
|
|
msgid "Using <code><a cbot|this>this</a></code>"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:81
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tMyClass object1(); // Call default constructor (without parameters)\n"
|
|
"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
|
|
"\tMyClass object3; // No constructor called, object3 == null\n"
|
|
"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:91
|
|
#, no-wrap
|
|
msgid "You can also define a destructor. This must be a <code><a cbot|void>void</a></code> fonction without parameters, which has the same name as the class but prefixed with the <code>~</code> character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:93
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tstatic private int counter = 0; // instance counter\n"
|
|
"\tvoid MyClass( )\n"
|
|
"\t{\n"
|
|
"\t\tcounter++; // one instance more\n"
|
|
"\t}\n"
|
|
"\tvoid ~MyClass( )\n"
|
|
"\t{\n"
|
|
"\t\tcounter--; // one instance less\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\t // counter == 0\n"
|
|
"\tMyClass item1( ); // counter == 1\n"
|
|
"\tMyClass item2( ); // counter == 2\n"
|
|
"\titem1 = null; // counter == 1\n"
|
|
"}\n"
|
|
"// counter == 0"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/class.txt:28
|
|
#, no-wrap
|
|
msgid "Accessing Class Members"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:29
|
|
#, no-wrap
|
|
msgid "Class members can be accessed outside of the class definition by using the <code>.</code> operator. Example:"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:50
|
|
#, no-wrap
|
|
msgid "Class members are <a cbot|public>public</a> by default, which means that they are accessible outside of the class definition. They can also be declared as <code><a cbot|private>private</a></code> or <code><a cbot|protected>protected</a></code>. Such members can only be accessed inside of the class definition."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:53
|
|
#, no-wrap
|
|
msgid "Fields and methods can also be declared as <code><a cbot|static>static</a></code>. Methods can be additionaly declared as <code><a cbot|synchro>synchronized</a></code>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:58
|
|
#, no-wrap
|
|
msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at <a cbot|new>creation</a> time of a class instance. Constructors can be <a cbot|function>overloaded</a>."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/class.txt:31
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class MyClass\n"
|
|
"{\n"
|
|
"\tint myField = 0;\n"
|
|
"\tint MyFunction()\n"
|
|
"\t{\n"
|
|
"\t\treturn myField * 2;\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tMyClass myObject();\n"
|
|
"\tmyObject.myField = 10;\n"
|
|
"\tmessage(myObject.MyFunction()); // 20\n"
|
|
"\tMyClass mySecondObject();\n"
|
|
"\tmySecondObject.myField = myObject.myField - 2;\n"
|
|
"\tmessage(mySecondObject.MyFunction()); // 16\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:121
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|static>static</a></code>, <code><a cbot|synchro>synchronized</a></code>, <code><a cbot|new>new</a></code>, <code><a cbot|pointer>reference</a></code>, <code><a cbot|this>this</a></code>, <code><a cbot|super>super</a></code>, <code><a cbot|extends>extends</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/protected.txt:1
|
|
#, no-wrap
|
|
msgid "Keyword <code>protected</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/protected.txt:2
|
|
#, no-wrap
|
|
msgid "This is an access modifier for <a cbot|class>class</a> members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the <code><a cbot|extends>extends</a></code> keyword)."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/protected.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class Parent\n"
|
|
"{\n"
|
|
"\tprotected int field = 0;\n"
|
|
"}\n"
|
|
"\n"
|
|
"public class Child extends Parent\n"
|
|
"{\n"
|
|
"\tvoid Print()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(field);\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tChild child();\n"
|
|
"\tchild.Print(); // 0\n"
|
|
"\t//child.field = 1; // Error!\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/private.txt:2
|
|
#, no-wrap
|
|
msgid "This is an access modifier for <a cbot|class>class</a> members. Private members are not accessible outside of the class definition."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/private.txt:20
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|protected>protected</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:34
|
|
#, no-wrap
|
|
msgid "<code>public</code> is also an access modifier for <a cbot|class>class</a> members, which is the default one. Public members can be accessed from outside of the class definition."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/public.txt:50
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|function>functions</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/protected.txt:27
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|extends>extends</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/super.txt:1
|
|
#, no-wrap
|
|
msgid "Keyword <code>super</code>"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/super.txt:46
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|this>this</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/this.txt:53
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|super>super</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/extends.txt:1
|
|
#, no-wrap
|
|
msgid "Keyword <code>extends</code>"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/extends.txt:30
|
|
#, no-wrap
|
|
msgid "Inherited Members"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:31
|
|
#, no-wrap
|
|
msgid "Only <code><a cbot|public>public</a></code> and <code><a cbot|protected>protected</a></code> members are inherited. <code><a cbot|private>private</a></code> members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:33
|
|
#, no-wrap
|
|
msgid "Constructors and destructors are not inherited, however, they can be overriden."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/extends.txt:35
|
|
#, no-wrap
|
|
msgid "Method Overriding"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:36
|
|
#, no-wrap
|
|
msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/extends.txt:38
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class Parent\n"
|
|
"{\n"
|
|
"\tvoid foo()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"foo\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"public class Child extends Parent\n"
|
|
"{\n"
|
|
"\tvoid foo()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"bar\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tChild child();\n"
|
|
"\tchild.foo(); // Will show \"bar\"\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/extends.txt:62
|
|
#, no-wrap
|
|
msgid "Polymorphism"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:63
|
|
#, no-wrap
|
|
msgid "<code><a cbot|pointer>Reference</a></code> of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/extends.txt:67
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class Parent\n"
|
|
"{\n"
|
|
"\tvoid foo()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"foo\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"public class Child extends Parent\n"
|
|
"{\n"
|
|
"\tvoid foo()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"bar\");\n"
|
|
"\t}\n"
|
|
"\tvoid bar()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"foo bar\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tParent people[2];\n"
|
|
"\tpeople[0] = new Parent();\n"
|
|
"\tpeople[1] = new Child();\n"
|
|
"\tfor (int i = 0; i < 2; ++i)\n"
|
|
"\t{\n"
|
|
"\t\tpeople[i].foo();\n"
|
|
"\t}\n"
|
|
"\t//people[1].bar(); // Error\n"
|
|
"\tChild child = people[1];\n"
|
|
"\tchild.bar(); // OK\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/extends.txt:102
|
|
#, no-wrap
|
|
msgid "Multiple Inheritance"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:103
|
|
#, no-wrap
|
|
msgid "A child cannot have multiple parents, however, a parent can have many children."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:106
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|new>new</a></code>, <code><a cbot|pointer>reference</a></code>, <code><a cbot|this>this</a></code>, <code><a cbot|super>super</a></code>\n"
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/super.txt:2
|
|
#, no-wrap
|
|
msgid "This keyword is similar to <code><a cbot|this>this</a></code>, however, it grants access to methods from the parent class (see the <code><a cbot|extends>extends</a></code> keyword), which is especially useful for method overriding."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/super.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class Parent\n"
|
|
"{\n"
|
|
"\tprotected int field;\n"
|
|
"\t\n"
|
|
"\tvoid Parent()\n"
|
|
"\t{\n"
|
|
"\t\tfield = 0;\n"
|
|
"\t}\n"
|
|
"\t\n"
|
|
"\tvoid Print()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"Parent's field: \" + field);\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"public class Child extends Parent\n"
|
|
"{\n"
|
|
"\tprivate int childsField;\n"
|
|
"\t\n"
|
|
"\tvoid Child()\n"
|
|
"\t{\n"
|
|
"\t\tsuper.Parent();\n"
|
|
"\t\tchildsField = field + 1;\n"
|
|
"\t}\n"
|
|
"\t\n"
|
|
"\tvoid Print()\n"
|
|
"\t{\n"
|
|
"\t\tsuper.Print();\n"
|
|
"\t\tmessage(\"Child's field: \" + childsField);\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tChild child();\n"
|
|
"\tchild.Print(); // Will show both 0 and 1\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:2
|
|
#, no-wrap
|
|
msgid "This keyword is used in a <code><a cbot|class>class</a></code> definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/extends.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"public class Parent\n"
|
|
"{\n"
|
|
"\tvoid foo()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"foo\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"public class Child extends Parent\n"
|
|
"{\n"
|
|
"\tvoid bar()\n"
|
|
"\t{\n"
|
|
"\t\tmessage(\"bar\");\n"
|
|
"\t}\n"
|
|
"}\n"
|
|
"\n"
|
|
"extern void object::Test()\n"
|
|
"{\n"
|
|
"\tChild child();\n"
|
|
"\tchild.foo(); // Will show \"foo\"\n"
|
|
"\tchild.bar(); // Will show \"bar\"\n"
|
|
"}"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/extends.txt:60
|
|
#, no-wrap
|
|
msgid "A parent's method can be called inside an overriden method by using the <code><a cbot|super>super</a></code> keyword."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/class.txt:56
|
|
#, no-wrap
|
|
msgid "As shown in the previous example, the class members can be initialized in the class definition (<c/>int x = 3.33;<n/>)."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/open.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>\"r\"</code> mode: open for reading.\n"
|
|
"<code>\"w\"</code> mode: open for writing.\n"
|
|
"<code>\"a\"</code> mode: open for appending."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/openfile.txt:2
|
|
#, no-wrap
|
|
msgid "<c/>openfile();<n/> opens an text file in the files/ folder. This is not a method of the <code><a cbot|file>file</a></code> class but openfile returns a <a cbot|pointer>reference</a> to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/openfile.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>\"r\"</code> mode: open for reading.\n"
|
|
"<code>\"w\"</code> mode: open for writing.\n"
|
|
"<code>\"w\"</code> mode: open for appending."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:14
|
|
#, no-wrap
|
|
msgid "Nothing but a name can be changed in the main function. The keyword <code><a cbot|extern>extern</a></code> distinguishes the main function from others."
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:117
|
|
#, no-wrap
|
|
msgid "Public Functions"
|
|
msgstr ""
|
|
|
|
#. type: \b; header
|
|
#: ../E/function.txt:129
|
|
#, no-wrap
|
|
msgid "Default Parameters"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:130
|
|
#, no-wrap
|
|
msgid "Last function parameters can have default values that can be omitted when calling."
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:132
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Add(float a = 0.0, float b = 0.0)\n"
|
|
"{\n"
|
|
"\treturn a + b;\n"
|
|
"}\n"
|
|
"\n"
|
|
"// Somewhere in the main program...\n"
|
|
"Add(); // Will return 0.0\n"
|
|
"Add(2.0); // Will return 2.0\n"
|
|
"Add(2.0, 3.0); // Will return 5.0\n"
|
|
"// ..."
|
|
msgstr ""
|
|
|
|
#. type: \t; header
|
|
#: ../E/function.txt:144
|
|
#, no-wrap
|
|
msgid "Default Parameters and Overloading"
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:145
|
|
#, no-wrap
|
|
msgid "Functions with default parameters still can be overloaded, one must only ensure that function calls are not ambiguous. For example, consider the following code:"
|
|
msgstr ""
|
|
|
|
#. type: Source code
|
|
#: ../E/function.txt:147
|
|
#, no-wrap
|
|
msgid ""
|
|
"float Add(float a = 0.0, float b = 0.0)\n"
|
|
"{\n"
|
|
"\treturn a + b;\n"
|
|
"}\n"
|
|
"\n"
|
|
"string Add(string a = \"\", string b = \"\")\n"
|
|
"{\n"
|
|
"\treturn a + b;\n"
|
|
"}\n"
|
|
"\n"
|
|
"// Somewhere in the main program...\n"
|
|
"Add(); // Compilation error: ambiguous call\n"
|
|
"Add(\"\"); // Ok\n"
|
|
"Add(0.0); // Ok\n"
|
|
"// ..."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/function.txt:163
|
|
#, no-wrap
|
|
msgid "Note that in the above example overloading causes the first default parameter to be useless as caller needs to pass it anyway in order to distinguish the two functions."
|
|
msgstr ""
|
|
|
|
#. type: Plain text
|
|
#: ../E/category.txt:70
|
|
#, no-wrap
|
|
msgid ""
|
|
"<button 192/> <code><a object|botbr>WheeledBuilder</a> </code>Wheeled Builder\n"
|
|
"<button 193/> <code><a object|botbc>TrackedBuilder</a> </code>Tracked Builder\n"
|
|
"<button 194/> <code><a object|botbj>WingedBuilder</a> </code>Winged Builder\n"
|
|
"<button 195/> <code><a object|botbs>LeggedBuilder</a> </code>Legged Builder"
|
|
msgstr ""
|