1# This file is part of the Colobot: Gold Edition source code 2# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam 3# This file is distributed under the same license as the Colobot package. 4# next_ghost <next_ghost@quick.cz>, 2018. 5msgid "" 6msgstr "" 7"Project-Id-Version: 0.1.11\n" 8"POT-Creation-Date: DATE\n" 9"PO-Revision-Date: 2018-03-11 18:18+01\n" 10"Last-Translator: next_ghost <next_ghost@quick.cz>\n" 11"Language-Team: Czech <next_ghost@quick.cz>\n" 12"Language: Czech\n" 13"MIME-Version: 1.0\n" 14"Content-Type: text/plain; charset=UTF-8\n" 15"Content-Transfer-Encoding: 8bit\n" 16"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" 17"X-Language: cs_CZ\n" 18"X-Source-Language: en_US\n" 19 20#. type: Title-text 21#: ../scene.txt:1 22#, no-wrap 23msgid "Follow with variables" 24msgstr "Jízda po trase s proměnnými" 25 26#. type: Resume-text 27#: ../scene.txt:2 28#, no-wrap 29msgid "Use variables in order to store the parameters of the path." 30msgstr "Uložte si vlastnosti trasy do proměnných." 31 32#. type: ScriptName-text 33#: ../scene.txt:3 34#, no-wrap 35msgid "Move" 36msgstr "Trasa2" 37 38#. type: \b; header 39#: ../help/help.E.txt:1 40#, no-wrap 41msgid "Exercise" 42msgstr "Cvičení" 43 44#. type: Plain text 45#: ../help/help.E.txt:2 46#, no-wrap 47msgid "" 48"This exercise is very similar to the previous one. The bot must move exactly in the same way, but when writing the program, you must use a new concept that is extremely important in programming: <a cbot|var>variables</a>.\n" 49"We saw that all the pads are at a distance form each other of 20 meters. And all the rotations performed consist in 90 degree angles. Instead of rewriting the same values over and over again in the program, we can store them in a variable: " 50msgstr "" 51"Toto cvičení je velmi podobné jako to předchozí. Robot musí projet naprosto stejnou trasu, ale tentokrát musíte při psaní programu použít nový koncept, který je v programování zcela nezbytný: <a cbot|var>proměnné</a>.\n" 52"Už jsme si řekli, že jednotlivé kontrolní body jsou od sebe vzdálené 20 metrů a každá zatáčka je o 90 stupňů. Abyste tato čísla v programu nemuseli opisovat pořád dokola, můžete si je uložit do proměnné: " 53 54#. type: Plain text 55#: ../help/help.E.txt:5 56#, no-wrap 57msgid "" 58"Instead of:\n" 59"<c/><s/>\tmove(20);" 60msgstr "" 61"Místo:\n" 62"<c/><s/>\tmove(20);" 63 64#. type: Source code 65#: ../help/help.E.txt:7 66#, no-wrap 67msgid "" 68"\tturn(90);\n" 69"\tmove(20);\n" 70"\tturn(-90);\n" 71"\t..." 72msgstr "" 73"\tturn(90);\n" 74"\tmove(20);\n" 75"\tturn(-90);\n" 76"\t..." 77 78#. type: Plain text 79#: ../help/help.E.txt:12 80#, no-wrap 81msgid "" 82"We write :\n" 83"<c/><s/>\tdist = 20;" 84msgstr "" 85"Můžete napsat:\n" 86"<c/><s/>\tdist = 20;" 87 88#. type: Source code 89#: ../help/help.E.txt:14 90#, no-wrap 91msgid "" 92"\tdir = 90;\n" 93"\tmove(dist);\n" 94"\tturn(dir);\n" 95"\tmove(dist);\n" 96"\tturn(-dir);\n" 97"\t..." 98msgstr "" 99"\tdir = 90;\n" 100"\tmove(dist);\n" 101"\tturn(dir);\n" 102"\tmove(dist);\n" 103"\tturn(-dir);\n" 104"\t..." 105 106#. type: \b; header 107#: ../help/help.E.txt:21 108#, no-wrap 109msgid "Variables" 110msgstr "Proměnné" 111 112#. type: Bullet: '1)' 113#: ../help/help.E.txt:23 114#, no-wrap 115msgid "The name," 116msgstr "Názvu," 117 118#. type: Bullet: '2)' 119#: ../help/help.E.txt:24 120#, no-wrap 121msgid "The type of the content," 122msgstr "Datového typu," 123 124#. type: Bullet: '3)' 125#: ../help/help.E.txt:25 126#, no-wrap 127msgid "The content." 128msgstr "Obsahu." 129 130#. type: \t; header 131#: ../help/help.E.txt:27 132#, no-wrap 133msgid "The name" 134msgstr "Název" 135 136#. type: Plain text 137#: ../help/help.E.txt:28 138#, no-wrap 139msgid "Use the name to refer to a variable. For example, instead of writing <c/>move(20);<n/>, write <c/>move(dist);<n/>: \"dist\" is the name of the variable. You can choose almost any name for a variable, for example <code>dist</code>, <code>dir</code>, <code>p2</code>, <code>a</code>, <code>x</code>, <code>nothing_2_grab</code>, etc." 140msgstr "Na proměnnou se odkazuje pomocí jejího názvu. Například místo <c/>move(20);<n/> můžete napsat <c/>move(dist);<n/>, kde \"dist\" je název proměnné. Proměnnou můžete nazvat v podstatě libovolně, například <code>dist</code>, <code>dir</code>, <code>p2</code>, <code>a</code>, <code>x</code>, <code>neni_co_sebrat</code>, atd." 141 142#. type: \t; header 143#: ../help/help.E.txt:30 144#, no-wrap 145msgid "The type" 146msgstr "Datový typ" 147 148#. type: Bullet: 'o' 149#: ../help/help.E.txt:32 150#, no-wrap 151msgid "<code><a cbot|int>int</a></code> for a whole number (12, -500, etc.)" 152msgstr "<code><a cbot|int>int</a></code> pro celá čísla (12, -500, atd.)" 153 154#. type: Bullet: 'o' 155#: ../help/help.E.txt:33 156#, no-wrap 157msgid "<code><a cbot|float>float</a></code> for a real number (3.14, 0.2, -99.98, etc.)" 158msgstr "<code><a cbot|float>float</a></code> pro reálná čísla (3.14, 0.2, -99.98, atd.)" 159 160#. type: Bullet: 'o' 161#: ../help/help.E.txt:34 162#, no-wrap 163msgid "<code><a cbot|string>string</a></code> for a character string (\"Hello!\", \"Nothing to grab\", etc.)" 164msgstr "<code><a cbot|string>string</a></code> pro textové řetězce (\"Ahoj!\", \"Neni co sebrat\", atd.)" 165 166#. type: Bullet: 'o' 167#: ../help/help.E.txt:35 168#, no-wrap 169msgid "<code><a cbot|point>point</a></code> for the x,y,z-coordinates of a point in space" 170msgstr "<code><a cbot|point>point</a></code> pro souřadnice bodu v prostoru (x, y, z)" 171 172#. type: Bullet: 'o' 173#: ../help/help.E.txt:36 174#, no-wrap 175msgid "<code><a cbot|object>object</a></code> for the information about an object (bot, building, etc.) " 176msgstr "<code><a cbot|object>object</a></code> pro informace o objektu (robot, budova, atd.) " 177 178#. type: \t; header 179#: ../help/help.E.txt:38 180#, no-wrap 181msgid "The content" 182msgstr "Obsah" 183 184#. type: Plain text 185#: ../help/help.E.txt:39 186#, no-wrap 187msgid "The content of a variable can be a number, a string, coordinates, etc., according to the type of the variable. The content of a variable can change many times during the execution of a program. " 188msgstr "Obsah proměnné může být číslo, řetězec, souřadnice, atd., záleží na typu proměnné. Obsah proměnné můžete za běhu programu libovolně měnit. " 189 190#. type: Plain text 191#: ../help/help.E.txt:41 192#, no-wrap 193msgid "Before you can use a variable, you have to declare it. For example, before you can use the two variables <code>dist</code> and <code>dir</code>, you must declare them with the following lines: " 194msgstr "Před použitím proměnné ji musíte deklarovat. Například před použitím proměnných <code>dist</code> a <code>dir</code> je musíte deklarovat takto: " 195 196#. type: Source code 197#: ../help/help.E.txt:43 198#, no-wrap 199msgid "" 200"\tfloat dist;\n" 201"\tfloat dir;" 202msgstr "" 203"\tfloat dist;\n" 204"\tfloat dir;" 205 206#. type: Plain text 207#: ../help/help.E.txt:46 208#, no-wrap 209msgid "Now you can use the two variables. To put the value 20 into <code>dist</code> and 90 into <code>dir</code>, write:" 210msgstr "Teď můžete obě proměnné začít používat. Abyste uložili hodnotu 20 do proměnné <code>dist</code> a 90 do proměnné <code>dir</code>, napište:" 211 212#. type: Source code 213#: ../help/help.E.txt:48 214#, no-wrap 215msgid "" 216"\tdist = 20;\n" 217"\tdir = 90;" 218msgstr "" 219"\tdist = 20;\n" 220"\tdir = 90;" 221 222#. type: Plain text 223#: ../help/help.E.txt:51 224#, no-wrap 225msgid "Now you can move and turn the bot with the instructions <code><a cbot|move>move</a></code> and <code><a cbot|turn>turn</code></a>:" 226msgstr "A teď už můžete robota řídit pomocí příkazů <code><a cbot|move>move</a></code> a <code><a cbot|turn>turn</a></code> i takto:" 227 228#. type: Source code 229#: ../help/help.E.txt:53 230#, no-wrap 231msgid "" 232"\tmove(dist);\n" 233"\tturn(dir);" 234msgstr "" 235"\tmove(dist);\n" 236"\tturn(dir);" 237 238#. type: Plain text 239#: ../help/help.E.txt:56 240#, no-wrap 241msgid "You can also use a whole <a cbot|expr>mathematical expression</a> instead of just the variable:" 242msgstr "Místo pouhé proměnné můžete použít i složitější <a cbot|expr>matematický výraz</a>:" 243 244#. type: Source code 245#: ../help/help.E.txt:58 246#, no-wrap 247msgid "" 248"\tmove(dist+100);\n" 249"\tturn(-dir);" 250msgstr "" 251"\tmove(dist+100);\n" 252"\tturn(-dir);" 253 254#. type: Plain text 255#: ../help/help.E.txt:61 256#, no-wrap 257msgid "The latter instruction will be needed to turn the bot right. " 258msgstr "Ten poslední příkaz bude třeba na otáčení robota doprava. " 259 260#. type: Plain text 261#: ../help/help.E.txt:63 262#, no-wrap 263msgid "Now, rewrite the program of the previous exercise, but use a variable for the distance and another variable for the angle of the rotation. " 264msgstr "Teď napište stejný program jako v předchozím cvičení, ale pro zadání vzdálenosti a úhlu otočení použijte proměnné. " 265 266#. type: \t; header 267#: ../help/help.E.txt:65 268#, no-wrap 269msgid "See also" 270msgstr "Užitečné odkazy" 271 272#. type: Plain text 273#: ../help/help.E.txt:66 274#, no-wrap 275msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>." 276msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>." 277 278#. type: Plain text 279#: ../help/help.E.txt:22 280#, no-wrap 281msgid "A <a cbot|var>variable</a> is composed of three elements: " 282msgstr "<a cbot|var>Proměnná</a> se skládá ze tří prvků: " 283 284#. type: Plain text 285#: ../help/help.E.txt:31 286#, no-wrap 287msgid "The type of a variable determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a character string, the coordinates of a point, etc. Here is a list with the most common variable types: " 288msgstr "Datový typ proměnné určuje, jaký druh informací do ní lze uložit. V závislosti na datovém typu může proměnná obsahovat celé číslo, reálné číslo, textový řetězec, souřadnice bodu, atd. Zde je seznam nejběžnějších datových typů: " 289