From a125f7ab3f967466d1903bf8b16016036adaebd9 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 3 Nov 2015 20:19:15 +0100 Subject: [PATCH] Add description of logical operators and bitwise operators --- help/cbot/E/cond.txt | 2 +- help/cbot/E/expr.txt | 34 +++++++++++- help/cbot/po/cbot.pot | 118 ++++++++++++++++++++++++++++++++---------- help/cbot/po/de.po | 118 ++++++++++++++++++++++++++++++++---------- help/cbot/po/fr.po | 118 ++++++++++++++++++++++++++++++++---------- help/cbot/po/pl.po | 118 ++++++++++++++++++++++++++++++++---------- help/cbot/po/ru.po | 118 ++++++++++++++++++++++++++++++++---------- 7 files changed, 493 insertions(+), 133 deletions(-) diff --git a/help/cbot/E/cond.txt b/help/cbot/E/cond.txt index 737a1f3c..e03fee6f 100644 --- a/help/cbot/E/cond.txt +++ b/help/cbot/E/cond.txt @@ -1,5 +1,5 @@ \b;Conditions -A condition is a special \l;expression\u cbot\expr; that returns a \l;boolean\u cbot\bool; value, that can only be either \c;\l;true\u cbot\true;\n; or \c;\l;false\u cbot\false;\n;. With a condition, you can choose f. ex. if the instructions in a \c;\l;while\u cbot\while;\n; loop must be repeated again, or if the instruction in a \c;\l;if\u cbot\if;\n; bloc must be executed. Condition must contain at least one logical operation. +A condition is a special \l;expression\u cbot\expr; that returns a \l;boolean\u cbot\bool; value, that can only be either \c;\l;true\u cbot\true;\n; or \c;\l;false\u cbot\false;\n;. With a condition, you can choose f. ex. if the instructions in a \c;\l;while\u cbot\while;\n; loop must be repeated again, or if the instruction in a \c;\l;if\u cbot\if;\n; bloc must be executed. \t;See also \l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;. diff --git a/help/cbot/E/expr.txt b/help/cbot/E/expr.txt index c23c9a60..e2c419ed 100644 --- a/help/cbot/E/expr.txt +++ b/help/cbot/E/expr.txt @@ -109,8 +109,8 @@ Tip: the properties of the concatenation \c;+\n; operator is useful with the \l; \s; // message(pi); // does not work \s; message(""+pi); \n; -\b;Logical operators -Logical operators work with values of type \l;bool\u cbot\bool; and they always return a \l;bool\u cbot\bool;. They are mainly used in \l;conditions\u cbot\cond;. +\b;Comparison operators +Comparison operators work with values of type \l;float\u cbot\bool; and they always return a \l;bool\u cbot\bool;. They are mainly used in \l;conditions\u cbot\cond;. \t;List \c;a == b \n;\c;a\n; equals \c;b\n; @@ -134,6 +134,19 @@ Be careful not to confuse the equality comparison \c;==\n; with the assignment o \c;a == b\n; is an expression that compares \c;a\n; with \c;b\n;. \c;a = b\n; is an expression that copies the value of \c;b\n; into \c;a\n;. +\b;Logical operators +Logical operators work with values of type \l;bool\u cbot\bool; and they always return a \l;bool\u cbot\bool;. They are mainly used in \l;conditions\u cbot\cond;. + +\t;List +\c;!a \n;not \c;a\n; +\c;a && b \n;\c;a\n; and \c;b\n; +\c;a || b \n;\c;a\n; or \c;b\n; + +\t;Examples +\c;!false \n;returns true +\c;true && false \n;returns false +\c;true || false \n;returns true + \b;Ternary operator 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: \c;(condition) ? (result when true) : (result when false)\n; @@ -144,6 +157,23 @@ Firstly, the condition is valued and then the first result is returned if the co \t;Example \s;\c;float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0\n; +\b;Bitwise operators +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. + +\t;List +\c;a & b \n;\c;a\n; AND \c;b\n; +\c;a | b \n;\c;a\n; OR \c;b\n; +\c;a ^ b \n;\c;a\n; XOR \c;b\n; +\c;a >> b \n;shift bits of \c;a\n; to the right \c;b\n; times +\c;a << b \n;shift bits of \c;a\n; to the left \c;b\n; times + +\t;Examples +\c;2 & 1 \n;returns 0 +\c;2 | 1 \n;returns 3 +\c;2 ^ 2 \n;returns 0 +\c;2 >> 1 \n;returns 1 +\c;2 << 1 \n;returns 4 + \b;Prefix and postfix increment- and decrement operators The operators \c;++\n; and \c;--\n; allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner. diff --git a/help/cbot/po/cbot.pot b/help/cbot/po/cbot.pot index af7c9b3f..aea6d230 100644 --- a/help/cbot/po/cbot.pot +++ b/help/cbot/po/cbot.pot @@ -53,13 +53,13 @@ msgid "Time in seconds." msgstr "" #. type: \t; header -#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:167 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 +#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:199 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 "" #. type: Plain text -#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:168 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 +#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:200 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 "Programming, types and categories." msgstr "" @@ -1248,7 +1248,7 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:148 +#: ../E/expr.txt:180 #, no-wrap msgid "The operators ++ and -- allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner." msgstr "" @@ -2396,7 +2396,7 @@ msgid "This information also returns the description of a whole object: the desc msgstr "" #. type: \t; header, \b; header -#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66 +#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:171 ../E/expr.txt:189 ../E/object.txt:66 #, no-wrap msgid "Examples" msgstr "" @@ -7117,7 +7117,7 @@ msgid "Binary operators below are working with fundamental number types (< msgstr "" #. type: \t; header -#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 +#: ../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 "" @@ -7216,37 +7216,37 @@ msgid "Tip: the properties of the concatenation + operator is usefu msgstr "" #. type: \b; header -#: ../E/expr.txt:147 +#: ../E/expr.txt:179 #, no-wrap msgid "Prefix and postfix increment- and decrement operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:150 +#: ../E/expr.txt:182 #, no-wrap msgid "For example to increment the variable a you can write" msgstr "" #. type: Source code -#: ../E/expr.txt:151 +#: ../E/expr.txt:183 #, no-wrap msgid "a++;" msgstr "" #. type: Plain text -#: ../E/expr.txt:152 +#: ../E/expr.txt:184 #, no-wrap msgid "instead of" msgstr "" #. type: Source code -#: ../E/expr.txt:153 +#: ../E/expr.txt:185 #, no-wrap msgid "a = a + 1;" msgstr "" #. type: Plain text -#: ../E/expr.txt:155 +#: ../E/expr.txt:187 #, no-wrap msgid "The result of the operation a++ is the value of the variable a *before* the increment. If you use the prefix operator ++a the result of the operation is the value of the variable a *after* the increment. The same holds for the -- decrement operator." msgstr "" @@ -7299,7 +7299,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:159 +#: ../E/expr.txt:191 #, no-wrap msgid "" " a = 2;\n" @@ -7308,7 +7308,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:163 +#: ../E/expr.txt:195 #, no-wrap msgid "" " a = 2;\n" @@ -7316,32 +7316,26 @@ msgid "" " // now b contains 3 and a contains 3" msgstr "" -#. type: Plain text -#: ../E/cond.txt:2 -#, no-wrap -msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if bloc must be executed. Condition must contain at least one logical operation." -msgstr "" - #. type: \b; header -#: ../E/expr.txt:112 +#: ../E/expr.txt:137 #, no-wrap msgid "Logical operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:113 +#: ../E/expr.txt:138 #, no-wrap msgid "Logical operators work with values of type bool and they always return a bool. They are mainly used in conditions." msgstr "" #. type: \b; header -#: ../E/expr.txt:137 +#: ../E/expr.txt:150 #, no-wrap msgid "Ternary operator" msgstr "" #. type: Plain text -#: ../E/expr.txt:138 +#: ../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" @@ -7350,19 +7344,91 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:142 +#: ../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:144 +#: ../E/expr.txt:157 #, no-wrap msgid "Example" msgstr "" #. type: Source code -#: ../E/expr.txt:145 +#: ../E/expr.txt:158 #, no-wrap msgid "float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0" msgstr "" + +#. type: Plain text +#: ../E/cond.txt:2 +#, no-wrap +msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if 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 float and they always return a bool. They are mainly used in conditions." +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:141 +#, no-wrap +msgid "" +"!a not a\n" +"a && b a and b\n" +"a || b a or b" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:146 +#, no-wrap +msgid "" +"!false returns true\n" +"true && false returns false \n" +"true || false 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 "" +"~a NOT a\n" +"a & b a AND b\n" +"a | b a OR b\n" +"a ^ b a XOR b\n" +"a >> b shift bits of a to the right b times\n" +"a << b shift bits of a to the left b times" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:172 +#, no-wrap +msgid "" +"~2 returns 1\n" +"2 & 1 returns 0\n" +"2 | 1 returns 3\n" +"2 ^ 2 returns 0\n" +"2 >> 1 returns 1\n" +"2 << 1 returns 4" +msgstr "" diff --git a/help/cbot/po/de.po b/help/cbot/po/de.po index 48fa2bc9..56917a31 100644 --- a/help/cbot/po/de.po +++ b/help/cbot/po/de.po @@ -53,13 +53,13 @@ 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:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:167 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 +#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:199 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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:31 ../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:168 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 +#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:200 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 "Programming, types and categories." msgstr "Die CBOT-Sprache, Variablentypen und Kategorien." @@ -1451,7 +1451,7 @@ msgstr "" "%= Rest der Division (nur für den Typ int)" #. type: Plain text -#: ../E/expr.txt:148 +#: ../E/expr.txt:180 #, no-wrap msgid "The operators ++ and -- allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner." msgstr "Mit den Operatore ++ und -- können Sie eine Variable mit einer sehr kurzen Schreibform inkrementieren (1 addieren) bzw. dekrementieren (1 subtrahieren)." @@ -2756,7 +2756,7 @@ msgid "This information also returns the description of a whole object: the desc msgstr "Diese Information gibt ebenfalls die Beschreibung eines ganzen Gegenstands zurück, in diesem Fall des Objekts, das ein Greifer trägt. Wenn er nichts trägt, gibt load den Wert null zurück." #. type: \t; header, \b; header -#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66 +#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:171 ../E/expr.txt:189 ../E/object.txt:66 #, no-wrap msgid "Examples" msgstr "Beispiel" @@ -7888,7 +7888,7 @@ msgid "Binary operators below are working with fundamental number types (< msgstr "" #. type: \t; header -#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 +#: ../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 "" @@ -7987,37 +7987,37 @@ msgid "Tip: the properties of the concatenation + operator is usefu msgstr "" #. type: \b; header -#: ../E/expr.txt:147 +#: ../E/expr.txt:179 #, no-wrap msgid "Prefix and postfix increment- and decrement operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:150 +#: ../E/expr.txt:182 #, no-wrap msgid "For example to increment the variable a you can write" msgstr "" #. type: Source code -#: ../E/expr.txt:151 +#: ../E/expr.txt:183 #, no-wrap msgid "a++;" msgstr "" #. type: Plain text -#: ../E/expr.txt:152 +#: ../E/expr.txt:184 #, no-wrap msgid "instead of" msgstr "" #. type: Source code -#: ../E/expr.txt:153 +#: ../E/expr.txt:185 #, no-wrap msgid "a = a + 1;" msgstr "" #. type: Plain text -#: ../E/expr.txt:155 +#: ../E/expr.txt:187 #, no-wrap msgid "The result of the operation a++ is the value of the variable a *before* the increment. If you use the prefix operator ++a the result of the operation is the value of the variable a *after* the increment. The same holds for the -- decrement operator." msgstr "" @@ -8070,7 +8070,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:159 +#: ../E/expr.txt:191 #, no-wrap msgid "" " a = 2;\n" @@ -8079,7 +8079,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:163 +#: ../E/expr.txt:195 #, no-wrap msgid "" " a = 2;\n" @@ -8087,32 +8087,26 @@ msgid "" " // now b contains 3 and a contains 3" msgstr "" -#. type: Plain text -#: ../E/cond.txt:2 -#, no-wrap -msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if bloc must be executed. Condition must contain at least one logical operation." -msgstr "" - #. type: \b; header -#: ../E/expr.txt:112 +#: ../E/expr.txt:137 #, no-wrap msgid "Logical operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:113 +#: ../E/expr.txt:138 #, no-wrap msgid "Logical operators work with values of type bool and they always return a bool. They are mainly used in conditions." msgstr "" #. type: \b; header -#: ../E/expr.txt:137 +#: ../E/expr.txt:150 #, no-wrap msgid "Ternary operator" msgstr "" #. type: Plain text -#: ../E/expr.txt:138 +#: ../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" @@ -8121,19 +8115,91 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:142 +#: ../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:144 +#: ../E/expr.txt:157 #, no-wrap msgid "Example" msgstr "" #. type: Source code -#: ../E/expr.txt:145 +#: ../E/expr.txt:158 #, no-wrap msgid "float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0" msgstr "" + +#. type: Plain text +#: ../E/cond.txt:2 +#, no-wrap +msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if 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 float and they always return a bool. They are mainly used in conditions." +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:141 +#, no-wrap +msgid "" +"!a not a\n" +"a && b a and b\n" +"a || b a or b" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:146 +#, no-wrap +msgid "" +"!false returns true\n" +"true && false returns false \n" +"true || false 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 "" +"~a NOT a\n" +"a & b a AND b\n" +"a | b a OR b\n" +"a ^ b a XOR b\n" +"a >> b shift bits of a to the right b times\n" +"a << b shift bits of a to the left b times" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:172 +#, no-wrap +msgid "" +"~2 returns 1\n" +"2 & 1 returns 0\n" +"2 | 1 returns 3\n" +"2 ^ 2 returns 0\n" +"2 >> 1 returns 1\n" +"2 << 1 returns 4" +msgstr "" diff --git a/help/cbot/po/fr.po b/help/cbot/po/fr.po index ca9d1e07..f0a6d9d7 100644 --- a/help/cbot/po/fr.po +++ b/help/cbot/po/fr.po @@ -53,13 +53,13 @@ msgid "Time in seconds." msgstr "Temps en secondes." #. type: \t; header -#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:167 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 +#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:199 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 "Voir aussi" #. type: Plain text -#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:168 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 +#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:200 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 "Programming, types and categories." msgstr "Programmation, types et catégories." @@ -1484,7 +1484,7 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:148 +#: ../E/expr.txt:180 #, no-wrap msgid "The operators ++ and -- allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner." msgstr "" @@ -2778,7 +2778,7 @@ msgid "This information also returns the description of a whole object: the desc msgstr "Cette information est spéciale, comme la précédente. Elle contient les caractéristiques de l'objet transporté par le robot déménageur. S'il ne transporte rien, load vaut null." #. type: \t; header, \b; header -#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66 +#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:171 ../E/expr.txt:189 ../E/object.txt:66 #, no-wrap msgid "Examples" msgstr "Examples" @@ -7856,7 +7856,7 @@ msgid "Binary operators below are working with fundamental number types (< msgstr "" #. type: \t; header -#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 +#: ../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 "" @@ -7955,37 +7955,37 @@ msgid "Tip: the properties of the concatenation + operator is usefu msgstr "" #. type: \b; header -#: ../E/expr.txt:147 +#: ../E/expr.txt:179 #, no-wrap msgid "Prefix and postfix increment- and decrement operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:150 +#: ../E/expr.txt:182 #, no-wrap msgid "For example to increment the variable a you can write" msgstr "" #. type: Source code -#: ../E/expr.txt:151 +#: ../E/expr.txt:183 #, no-wrap msgid "a++;" msgstr "" #. type: Plain text -#: ../E/expr.txt:152 +#: ../E/expr.txt:184 #, no-wrap msgid "instead of" msgstr "" #. type: Source code -#: ../E/expr.txt:153 +#: ../E/expr.txt:185 #, no-wrap msgid "a = a + 1;" msgstr "" #. type: Plain text -#: ../E/expr.txt:155 +#: ../E/expr.txt:187 #, no-wrap msgid "The result of the operation a++ is the value of the variable a *before* the increment. If you use the prefix operator ++a the result of the operation is the value of the variable a *after* the increment. The same holds for the -- decrement operator." msgstr "" @@ -8038,7 +8038,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:159 +#: ../E/expr.txt:191 #, no-wrap msgid "" " a = 2;\n" @@ -8047,7 +8047,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:163 +#: ../E/expr.txt:195 #, no-wrap msgid "" " a = 2;\n" @@ -8055,32 +8055,26 @@ msgid "" " // now b contains 3 and a contains 3" msgstr "" -#. type: Plain text -#: ../E/cond.txt:2 -#, no-wrap -msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if bloc must be executed. Condition must contain at least one logical operation." -msgstr "" - #. type: \b; header -#: ../E/expr.txt:112 +#: ../E/expr.txt:137 #, no-wrap msgid "Logical operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:113 +#: ../E/expr.txt:138 #, no-wrap msgid "Logical operators work with values of type bool and they always return a bool. They are mainly used in conditions." msgstr "" #. type: \b; header -#: ../E/expr.txt:137 +#: ../E/expr.txt:150 #, no-wrap msgid "Ternary operator" msgstr "" #. type: Plain text -#: ../E/expr.txt:138 +#: ../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" @@ -8089,19 +8083,91 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:142 +#: ../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:144 +#: ../E/expr.txt:157 #, no-wrap msgid "Example" msgstr "" #. type: Source code -#: ../E/expr.txt:145 +#: ../E/expr.txt:158 #, no-wrap msgid "float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0" msgstr "" + +#. type: Plain text +#: ../E/cond.txt:2 +#, no-wrap +msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if 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 float and they always return a bool. They are mainly used in conditions." +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:141 +#, no-wrap +msgid "" +"!a not a\n" +"a && b a and b\n" +"a || b a or b" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:146 +#, no-wrap +msgid "" +"!false returns true\n" +"true && false returns false \n" +"true || false 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 "" +"~a NOT a\n" +"a & b a AND b\n" +"a | b a OR b\n" +"a ^ b a XOR b\n" +"a >> b shift bits of a to the right b times\n" +"a << b shift bits of a to the left b times" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:172 +#, no-wrap +msgid "" +"~2 returns 1\n" +"2 & 1 returns 0\n" +"2 | 1 returns 3\n" +"2 ^ 2 returns 0\n" +"2 >> 1 returns 1\n" +"2 << 1 returns 4" +msgstr "" diff --git a/help/cbot/po/pl.po b/help/cbot/po/pl.po index eb9646f4..80cc25f2 100644 --- a/help/cbot/po/pl.po +++ b/help/cbot/po/pl.po @@ -53,13 +53,13 @@ msgid "Time in seconds." msgstr "Czas w sekundach." #. type: \t; header -#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:167 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 +#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:199 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 "Zobacz również" #. type: Plain text -#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:168 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 +#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:200 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 "Programming, types and categories." msgstr "Programowanie, typy i kategorie." @@ -1495,7 +1495,7 @@ msgstr "" "%= reszta z dzielenia (tylko dla typu całkowitego int)" #. type: Plain text -#: ../E/expr.txt:148 +#: ../E/expr.txt:180 #, no-wrap msgid "The operators ++ and -- allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner." msgstr "Operatory ++ i -- umożliwiają wygodny i zwarty zapis zwiększania (++) lub zmiejszania (--) zmiennych." @@ -2801,7 +2801,7 @@ msgid "This information also returns the description of a whole object: the desc msgstr "Ta informacja również zwraca opis całego obiektu, a mianowicie opis obiektu trzymanego przez transporter. Jeśli nie niesie on niczego, load jest równe null." #. type: \t; header, \b; header -#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66 +#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:171 ../E/expr.txt:189 ../E/object.txt:66 #, no-wrap msgid "Examples" msgstr "Przykłady" @@ -8073,7 +8073,7 @@ msgid "Binary operators below are working with fundamental number types (< msgstr "" #. type: \t; header -#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 +#: ../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 "" @@ -8172,37 +8172,37 @@ msgid "Tip: the properties of the concatenation + operator is usefu msgstr "" #. type: \b; header -#: ../E/expr.txt:147 +#: ../E/expr.txt:179 #, no-wrap msgid "Prefix and postfix increment- and decrement operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:150 +#: ../E/expr.txt:182 #, no-wrap msgid "For example to increment the variable a you can write" msgstr "" #. type: Source code -#: ../E/expr.txt:151 +#: ../E/expr.txt:183 #, no-wrap msgid "a++;" msgstr "" #. type: Plain text -#: ../E/expr.txt:152 +#: ../E/expr.txt:184 #, no-wrap msgid "instead of" msgstr "" #. type: Source code -#: ../E/expr.txt:153 +#: ../E/expr.txt:185 #, no-wrap msgid "a = a + 1;" msgstr "" #. type: Plain text -#: ../E/expr.txt:155 +#: ../E/expr.txt:187 #, no-wrap msgid "The result of the operation a++ is the value of the variable a *before* the increment. If you use the prefix operator ++a the result of the operation is the value of the variable a *after* the increment. The same holds for the -- decrement operator." msgstr "" @@ -8255,7 +8255,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:159 +#: ../E/expr.txt:191 #, no-wrap msgid "" " a = 2;\n" @@ -8264,7 +8264,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:163 +#: ../E/expr.txt:195 #, no-wrap msgid "" " a = 2;\n" @@ -8272,32 +8272,26 @@ msgid "" " // now b contains 3 and a contains 3" msgstr "" -#. type: Plain text -#: ../E/cond.txt:2 -#, no-wrap -msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if bloc must be executed. Condition must contain at least one logical operation." -msgstr "" - #. type: \b; header -#: ../E/expr.txt:112 +#: ../E/expr.txt:137 #, no-wrap msgid "Logical operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:113 +#: ../E/expr.txt:138 #, no-wrap msgid "Logical operators work with values of type bool and they always return a bool. They are mainly used in conditions." msgstr "" #. type: \b; header -#: ../E/expr.txt:137 +#: ../E/expr.txt:150 #, no-wrap msgid "Ternary operator" msgstr "" #. type: Plain text -#: ../E/expr.txt:138 +#: ../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" @@ -8306,19 +8300,91 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:142 +#: ../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:144 +#: ../E/expr.txt:157 #, no-wrap msgid "Example" msgstr "" #. type: Source code -#: ../E/expr.txt:145 +#: ../E/expr.txt:158 #, no-wrap msgid "float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0" msgstr "" + +#. type: Plain text +#: ../E/cond.txt:2 +#, no-wrap +msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if 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 float and they always return a bool. They are mainly used in conditions." +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:141 +#, no-wrap +msgid "" +"!a not a\n" +"a && b a and b\n" +"a || b a or b" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:146 +#, no-wrap +msgid "" +"!false returns true\n" +"true && false returns false \n" +"true || false 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 "" +"~a NOT a\n" +"a & b a AND b\n" +"a | b a OR b\n" +"a ^ b a XOR b\n" +"a >> b shift bits of a to the right b times\n" +"a << b shift bits of a to the left b times" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:172 +#, no-wrap +msgid "" +"~2 returns 1\n" +"2 & 1 returns 0\n" +"2 | 1 returns 3\n" +"2 ^ 2 returns 0\n" +"2 >> 1 returns 1\n" +"2 << 1 returns 4" +msgstr "" diff --git a/help/cbot/po/ru.po b/help/cbot/po/ru.po index 6db59754..9e17e31f 100644 --- a/help/cbot/po/ru.po +++ b/help/cbot/po/ru.po @@ -53,13 +53,13 @@ msgid "Time in seconds." msgstr "" #. type: \t; header -#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:167 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 +#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:30 ../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:107 ../E/ceil.txt:12 ../E/class.txt:70 ../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:199 ../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:38 ../E/function.txt:129 ../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:18 ../E/openfile.txt:10 ../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:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../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/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 "См. также" #. type: Plain text -#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:168 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 +#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:31 ../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:200 ../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:39 ../E/function.txt:130 ../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:11 ../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/radar.txt:81 ../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 "Programming, types and categories." msgstr "Программирование, типы и категории." @@ -1495,7 +1495,7 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:148 +#: ../E/expr.txt:180 #, no-wrap msgid "The operators ++ and -- allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner." msgstr "" @@ -2790,7 +2790,7 @@ msgid "This information also returns the description of a whole object: the desc msgstr "Эта информация также вернет описание целого объекта: описание объекта, который несет несущий. Если он ничего не несет, то load вернет null." #. type: \t; header, \b; header -#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66 +#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:145 ../E/expr.txt:171 ../E/expr.txt:189 ../E/object.txt:66 #, no-wrap msgid "Examples" msgstr "Примеры" @@ -7867,7 +7867,7 @@ msgid "Binary operators below are working with fundamental number types (< msgstr "" #. type: \t; header -#: ../E/expr.txt:53 ../E/expr.txt:89 ../E/expr.txt:115 +#: ../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 "" @@ -7966,37 +7966,37 @@ msgid "Tip: the properties of the concatenation + operator is usefu msgstr "" #. type: \b; header -#: ../E/expr.txt:147 +#: ../E/expr.txt:179 #, no-wrap msgid "Prefix and postfix increment- and decrement operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:150 +#: ../E/expr.txt:182 #, no-wrap msgid "For example to increment the variable a you can write" msgstr "" #. type: Source code -#: ../E/expr.txt:151 +#: ../E/expr.txt:183 #, no-wrap msgid "a++;" msgstr "" #. type: Plain text -#: ../E/expr.txt:152 +#: ../E/expr.txt:184 #, no-wrap msgid "instead of" msgstr "" #. type: Source code -#: ../E/expr.txt:153 +#: ../E/expr.txt:185 #, no-wrap msgid "a = a + 1;" msgstr "" #. type: Plain text -#: ../E/expr.txt:155 +#: ../E/expr.txt:187 #, no-wrap msgid "The result of the operation a++ is the value of the variable a *before* the increment. If you use the prefix operator ++a the result of the operation is the value of the variable a *after* the increment. The same holds for the -- decrement operator." msgstr "" @@ -8049,7 +8049,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:159 +#: ../E/expr.txt:191 #, no-wrap msgid "" " a = 2;\n" @@ -8058,7 +8058,7 @@ msgid "" msgstr "" #. type: Source code -#: ../E/expr.txt:163 +#: ../E/expr.txt:195 #, no-wrap msgid "" " a = 2;\n" @@ -8066,32 +8066,26 @@ msgid "" " // now b contains 3 and a contains 3" msgstr "" -#. type: Plain text -#: ../E/cond.txt:2 -#, no-wrap -msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if bloc must be executed. Condition must contain at least one logical operation." -msgstr "" - #. type: \b; header -#: ../E/expr.txt:112 +#: ../E/expr.txt:137 #, no-wrap msgid "Logical operators" msgstr "" #. type: Plain text -#: ../E/expr.txt:113 +#: ../E/expr.txt:138 #, no-wrap msgid "Logical operators work with values of type bool and they always return a bool. They are mainly used in conditions." msgstr "" #. type: \b; header -#: ../E/expr.txt:137 +#: ../E/expr.txt:150 #, no-wrap msgid "Ternary operator" msgstr "" #. type: Plain text -#: ../E/expr.txt:138 +#: ../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" @@ -8100,19 +8094,91 @@ msgid "" msgstr "" #. type: Plain text -#: ../E/expr.txt:142 +#: ../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:144 +#: ../E/expr.txt:157 #, no-wrap msgid "Example" msgstr "" #. type: Source code -#: ../E/expr.txt:145 +#: ../E/expr.txt:158 #, no-wrap msgid "float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0" msgstr "" + +#. type: Plain text +#: ../E/cond.txt:2 +#, no-wrap +msgid "A condition is a special expression that returns a boolean value, that can only be either true or false. With a condition, you can choose f. ex. if the instructions in a while loop must be repeated again, or if the instruction in a if 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 float and they always return a bool. They are mainly used in conditions." +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:141 +#, no-wrap +msgid "" +"!a not a\n" +"a && b a and b\n" +"a || b a or b" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:146 +#, no-wrap +msgid "" +"!false returns true\n" +"true && false returns false \n" +"true || false 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 "" +"~a NOT a\n" +"a & b a AND b\n" +"a | b a OR b\n" +"a ^ b a XOR b\n" +"a >> b shift bits of a to the right b times\n" +"a << b shift bits of a to the left b times" +msgstr "" + +#. type: Plain text +#: ../E/expr.txt:172 +#, no-wrap +msgid "" +"~2 returns 1\n" +"2 & 1 returns 0\n" +"2 | 1 returns 3\n" +"2 ^ 2 returns 0\n" +"2 >> 1 returns 1\n" +"2 << 1 returns 4" +msgstr ""