Add description of ternary operator (closes #674)
parent
20e4866620
commit
0222aa44c4
|
@ -134,6 +134,16 @@ 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;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;
|
||||
Brackets are not needed.
|
||||
|
||||
Firstly, the condition is valued and then the first result is returned if the condition is true, otherwise the second result is returned.
|
||||
|
||||
\t;Example
|
||||
\s;\c;float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0\n;
|
||||
|
||||
\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.
|
||||
|
||||
|
|
|
@ -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:157 ../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: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
|
||||
#, 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:158 ../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: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
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr ""
|
||||
|
@ -1248,7 +1248,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#: ../E/expr.txt:148
|
||||
#, 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 ""
|
||||
|
@ -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:147 ../E/object.txt:66
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66
|
||||
#, no-wrap
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
@ -7216,37 +7216,37 @@ msgid "Tip: the properties of the concatenation <code>+</code> operator is usefu
|
|||
msgstr ""
|
||||
|
||||
#. type: \b; header
|
||||
#: ../E/expr.txt:137
|
||||
#: ../E/expr.txt:147
|
||||
#, no-wrap
|
||||
msgid "Prefix and postfix increment- and decrement operators"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:140
|
||||
#: ../E/expr.txt:150
|
||||
#, no-wrap
|
||||
msgid "For example to increment the variable <code>a</code> you can write"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:141
|
||||
#: ../E/expr.txt:151
|
||||
#, no-wrap
|
||||
msgid "<c/>a++;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:142
|
||||
#: ../E/expr.txt:152
|
||||
#, no-wrap
|
||||
msgid "instead of"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:143
|
||||
#: ../E/expr.txt:153
|
||||
#, no-wrap
|
||||
msgid "<c/>a = a + 1;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:145
|
||||
#: ../E/expr.txt:155
|
||||
#, 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 ""
|
||||
|
@ -7299,7 +7299,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:149
|
||||
#: ../E/expr.txt:159
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -7308,7 +7308,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:153
|
||||
#: ../E/expr.txt:163
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -7333,3 +7333,36 @@ msgstr ""
|
|||
#, 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:137
|
||||
#, no-wrap
|
||||
msgid "Ternary operator"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#, 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:142
|
||||
#, 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
|
||||
#, no-wrap
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:145
|
||||
#, no-wrap
|
||||
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
||||
msgstr ""
|
||||
|
|
|
@ -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:157 ../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: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
|
||||
#, 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:158 ../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: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
|
||||
#, 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>."
|
||||
|
@ -1451,7 +1451,7 @@ msgstr ""
|
|||
"<code>%=</code> Rest der Division (nur für den Typ <code><a cbot|int>int</a></code>)"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#: ../E/expr.txt:148
|
||||
#, 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)."
|
||||
|
@ -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 <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:147 ../E/object.txt:66
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66
|
||||
#, no-wrap
|
||||
msgid "Examples"
|
||||
msgstr "Beispiel"
|
||||
|
@ -7987,37 +7987,37 @@ msgid "Tip: the properties of the concatenation <code>+</code> operator is usefu
|
|||
msgstr ""
|
||||
|
||||
#. type: \b; header
|
||||
#: ../E/expr.txt:137
|
||||
#: ../E/expr.txt:147
|
||||
#, no-wrap
|
||||
msgid "Prefix and postfix increment- and decrement operators"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:140
|
||||
#: ../E/expr.txt:150
|
||||
#, no-wrap
|
||||
msgid "For example to increment the variable <code>a</code> you can write"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:141
|
||||
#: ../E/expr.txt:151
|
||||
#, no-wrap
|
||||
msgid "<c/>a++;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:142
|
||||
#: ../E/expr.txt:152
|
||||
#, no-wrap
|
||||
msgid "instead of"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:143
|
||||
#: ../E/expr.txt:153
|
||||
#, no-wrap
|
||||
msgid "<c/>a = a + 1;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:145
|
||||
#: ../E/expr.txt:155
|
||||
#, 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 ""
|
||||
|
@ -8070,7 +8070,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:149
|
||||
#: ../E/expr.txt:159
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8079,7 +8079,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:153
|
||||
#: ../E/expr.txt:163
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8104,3 +8104,36 @@ msgstr ""
|
|||
#, 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:137
|
||||
#, no-wrap
|
||||
msgid "Ternary operator"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#, 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:142
|
||||
#, 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
|
||||
#, no-wrap
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:145
|
||||
#, no-wrap
|
||||
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
||||
msgstr ""
|
||||
|
|
|
@ -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:157 ../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: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
|
||||
#, 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:158 ../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: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
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programmation</a>, <a cbot|type>types</a> et <a cbot|category>catégories</a>."
|
||||
|
@ -1484,7 +1484,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#: ../E/expr.txt:148
|
||||
#, 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 ""
|
||||
|
@ -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 <a object|botgr>robot déménageur</a>. S'il ne transporte rien, <code>load</code> vaut <code>null</code>."
|
||||
|
||||
#. type: \t; header, \b; header
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:147 ../E/object.txt:66
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66
|
||||
#, no-wrap
|
||||
msgid "Examples"
|
||||
msgstr "Examples"
|
||||
|
@ -7955,37 +7955,37 @@ msgid "Tip: the properties of the concatenation <code>+</code> operator is usefu
|
|||
msgstr ""
|
||||
|
||||
#. type: \b; header
|
||||
#: ../E/expr.txt:137
|
||||
#: ../E/expr.txt:147
|
||||
#, no-wrap
|
||||
msgid "Prefix and postfix increment- and decrement operators"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:140
|
||||
#: ../E/expr.txt:150
|
||||
#, no-wrap
|
||||
msgid "For example to increment the variable <code>a</code> you can write"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:141
|
||||
#: ../E/expr.txt:151
|
||||
#, no-wrap
|
||||
msgid "<c/>a++;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:142
|
||||
#: ../E/expr.txt:152
|
||||
#, no-wrap
|
||||
msgid "instead of"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:143
|
||||
#: ../E/expr.txt:153
|
||||
#, no-wrap
|
||||
msgid "<c/>a = a + 1;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:145
|
||||
#: ../E/expr.txt:155
|
||||
#, 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 ""
|
||||
|
@ -8038,7 +8038,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:149
|
||||
#: ../E/expr.txt:159
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8047,7 +8047,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:153
|
||||
#: ../E/expr.txt:163
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8072,3 +8072,36 @@ msgstr ""
|
|||
#, 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:137
|
||||
#, no-wrap
|
||||
msgid "Ternary operator"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#, 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:142
|
||||
#, 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
|
||||
#, no-wrap
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:145
|
||||
#, no-wrap
|
||||
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
||||
msgstr ""
|
||||
|
|
|
@ -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:157 ../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: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
|
||||
#, 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:158 ../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: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
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programowanie</a>, <a cbot|type>typy</a> i <a cbot|category>kategorie</a>."
|
||||
|
@ -1495,7 +1495,7 @@ msgstr ""
|
|||
"<code>%=</code> reszta z dzielenia (tylko dla typu całkowitego <code><a cbot|int>int</a></code>)"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#: ../E/expr.txt:148
|
||||
#, 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 "Operatory <code>++</code> i <code>--</code> 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 <a object|botgr>transporter</a>. Jeśli nie niesie on niczego, <code>load</code> jest równe <code>null</code>."
|
||||
|
||||
#. type: \t; header, \b; header
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:147 ../E/object.txt:66
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66
|
||||
#, no-wrap
|
||||
msgid "Examples"
|
||||
msgstr "Przykłady"
|
||||
|
@ -8172,37 +8172,37 @@ msgid "Tip: the properties of the concatenation <code>+</code> operator is usefu
|
|||
msgstr ""
|
||||
|
||||
#. type: \b; header
|
||||
#: ../E/expr.txt:137
|
||||
#: ../E/expr.txt:147
|
||||
#, no-wrap
|
||||
msgid "Prefix and postfix increment- and decrement operators"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:140
|
||||
#: ../E/expr.txt:150
|
||||
#, no-wrap
|
||||
msgid "For example to increment the variable <code>a</code> you can write"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:141
|
||||
#: ../E/expr.txt:151
|
||||
#, no-wrap
|
||||
msgid "<c/>a++;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:142
|
||||
#: ../E/expr.txt:152
|
||||
#, no-wrap
|
||||
msgid "instead of"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:143
|
||||
#: ../E/expr.txt:153
|
||||
#, no-wrap
|
||||
msgid "<c/>a = a + 1;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:145
|
||||
#: ../E/expr.txt:155
|
||||
#, 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 ""
|
||||
|
@ -8255,7 +8255,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:149
|
||||
#: ../E/expr.txt:159
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8264,7 +8264,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:153
|
||||
#: ../E/expr.txt:163
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8289,3 +8289,36 @@ msgstr ""
|
|||
#, 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:137
|
||||
#, no-wrap
|
||||
msgid "Ternary operator"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#, 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:142
|
||||
#, 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
|
||||
#, no-wrap
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:145
|
||||
#, no-wrap
|
||||
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
||||
msgstr ""
|
||||
|
|
|
@ -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:157 ../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: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
|
||||
#, 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:158 ../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: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
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Программирование</a>, <a cbot|type>типы</a> и <a cbot|category>категории</a>."
|
||||
|
@ -1495,7 +1495,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#: ../E/expr.txt:148
|
||||
#, 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 ""
|
||||
|
@ -2790,7 +2790,7 @@ msgid "This information also returns the description of a whole object: the desc
|
|||
msgstr "Эта информация также вернет описание целого объекта: описание объекта, который несет <a object|botgr>несущий</a>. Если он ничего не несет, то <code>load</code> вернет <code>null</code>."
|
||||
|
||||
#. type: \t; header, \b; header
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:147 ../E/object.txt:66
|
||||
#: ../E/expr.txt:99 ../E/expr.txt:123 ../E/expr.txt:157 ../E/object.txt:66
|
||||
#, no-wrap
|
||||
msgid "Examples"
|
||||
msgstr "Примеры"
|
||||
|
@ -7966,37 +7966,37 @@ msgid "Tip: the properties of the concatenation <code>+</code> operator is usefu
|
|||
msgstr ""
|
||||
|
||||
#. type: \b; header
|
||||
#: ../E/expr.txt:137
|
||||
#: ../E/expr.txt:147
|
||||
#, no-wrap
|
||||
msgid "Prefix and postfix increment- and decrement operators"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:140
|
||||
#: ../E/expr.txt:150
|
||||
#, no-wrap
|
||||
msgid "For example to increment the variable <code>a</code> you can write"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:141
|
||||
#: ../E/expr.txt:151
|
||||
#, no-wrap
|
||||
msgid "<c/>a++;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:142
|
||||
#: ../E/expr.txt:152
|
||||
#, no-wrap
|
||||
msgid "instead of"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:143
|
||||
#: ../E/expr.txt:153
|
||||
#, no-wrap
|
||||
msgid "<c/>a = a + 1;<n/>"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:145
|
||||
#: ../E/expr.txt:155
|
||||
#, 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 ""
|
||||
|
@ -8049,7 +8049,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:149
|
||||
#: ../E/expr.txt:159
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8058,7 +8058,7 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:153
|
||||
#: ../E/expr.txt:163
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" a = 2;\n"
|
||||
|
@ -8083,3 +8083,36 @@ msgstr ""
|
|||
#, 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:137
|
||||
#, no-wrap
|
||||
msgid "Ternary operator"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../E/expr.txt:138
|
||||
#, 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:142
|
||||
#, 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
|
||||
#, no-wrap
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#. type: Source code
|
||||
#: ../E/expr.txt:145
|
||||
#, no-wrap
|
||||
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in New Issue