317 lines
9.7 KiB
Plaintext
317 lines
9.7 KiB
Plaintext
# Copyright (C) 2016 Free Software Foundation, Inc.
|
|
# This file is distributed under the same license as the PACKAGE package.
|
|
# José Robson Mariano Alves <jose.alves@ifto.edu.br>, 2018.
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: colobot-data 0.1.7\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"POT-Creation-Date: DATE\n"
|
|
"PO-Revision-Date: 2018-05-11 17:07-0300\n"
|
|
"Last-Translator: José Robson Mariano Alves <jose.alves@ifto.edu.br>\n"
|
|
"Language: pt_PT\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
"X-Generator: Lokalize 2.0\n"
|
|
"Language-Team: Portuguese <kde-i18n-pt_BR@kde.org>\n"
|
|
|
|
#. type: Title-text
|
|
#: ../scene.txt:1
|
|
#, no-wrap
|
|
msgid "A function"
|
|
msgstr "Uma função"
|
|
|
|
#. type: Resume-text
|
|
#: ../scene.txt:2
|
|
#, no-wrap
|
|
msgid "Create a function in order to make your program shorter."
|
|
msgstr "Crie uma função para tornar seu programa mais curto."
|
|
|
|
#. type: ScriptName-text
|
|
#: ../scene.txt:3
|
|
#, no-wrap
|
|
msgid "Move"
|
|
msgstr "Mover"
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:1
|
|
#, no-wrap
|
|
msgid "Exercise"
|
|
msgstr "Exercício"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:2
|
|
#, no-wrap
|
|
msgid ""
|
|
"The <a object|bottr>bot</a> must pass over all the <a object|waypoint>blue"
|
|
" crosses</a> on the ground. The way that must be covered is made of two"
|
|
" squares. The first one measures 15 meters, the second 25 meters."
|
|
msgstr ""
|
|
"O <a object|bottr>robô</a> deve passar por todas as <a object|waypoint>cruzes"
|
|
" azuis</a> no solo. O caminho que deve ser coberto é feito de dois quadrados."
|
|
" O primeiro mede 15 metros, o segundo 25 metros."
|
|
|
|
#. type: Image filename
|
|
#: ../help/help.E.txt:4
|
|
#, no-wrap
|
|
msgid "tproc1a"
|
|
msgstr "tproc1a"
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:5
|
|
#, no-wrap
|
|
msgid "General principle"
|
|
msgstr "Princípio geral"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:6
|
|
#, no-wrap
|
|
msgid ""
|
|
"In order to solve this problem, the most efficient solution consists in"
|
|
" creating a <a cbot|function>function</a> that instructs the bot to move on a"
|
|
" square shape of a certain size. The main program becomes then very simple:<"
|
|
"c/>"
|
|
msgstr ""
|
|
"Para resolver esse problema, a solução mais eficiente consiste em criar uma <"
|
|
"a cbot|function>função</a> que instrui o robô a se mover em uma forma"
|
|
" quadrada de um determinado tamanho. O programa principal torna-se então"
|
|
" muito simples: <c/>"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Function1( )\n"
|
|
"{\n"
|
|
"\tSquare(15);\n"
|
|
"\tSquare(25);\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Funcao1( )\n"
|
|
"{\n"
|
|
"\tQuadrado(15);\n"
|
|
"\tQuadrado(25);\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:13
|
|
#, no-wrap
|
|
msgid ""
|
|
"You still have to define the function called <code>Square</code>. In order to"
|
|
" do this, you will have to write some instructions outside the <a cbot|bloc"
|
|
">block</a> that until now was the frame of each one of your programs. At the"
|
|
" very end of the program, after the last closing brace, we will define the"
|
|
" function <code>Square</code>. The program will take the following shape:"
|
|
msgstr ""
|
|
"Você ainda precisa definir a função chamada <code>Quadrado</code>. Para fazer"
|
|
" isso, você terá que escrever algumas instruções fora do <a cbot|bloc>bloco<"
|
|
"/a> que até agora era o quadro de cada um dos seus programas. No final do"
|
|
" programa, após a última chave de fechamento, definiremos a função <code"
|
|
">Quadrado</code>. O programa terá a seguinte forma:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:15
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::Function1( )\n"
|
|
"{\n"
|
|
"\t<n/>main function ...<code>\n"
|
|
"}\n"
|
|
"\n"
|
|
"void object::Square(float length)\n"
|
|
"{\n"
|
|
"\t</code>new function ...<c/>\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Funcao1( )\n"
|
|
"{\n"
|
|
"\t<n/>função principal...<code>\n"
|
|
"}\n"
|
|
"\n"
|
|
"void object::Quadrado(float comprimento)\n"
|
|
"{\n"
|
|
"\t</code>nova função...<c/>\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:25
|
|
#, no-wrap
|
|
msgid ""
|
|
"Let us look in detail at the different elements of the declaration of the"
|
|
" function <code>Square</code>:"
|
|
msgstr ""
|
|
"Vamos olhar detalhadamente os diferentes elementos da declaração da função <"
|
|
"code>Quadrado</code>:"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:27
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|void>void</a></code>\n"
|
|
"This means that this function will return no value."
|
|
msgstr ""
|
|
"<code><a cbot|void>void</a></code>\n"
|
|
"Isso significa que essa função não retornará nenhum valor."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:30
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|object>object</a>::</code>\n"
|
|
"When you write this in front of the function name, you can have access in the"
|
|
" function to all the characteristics of the bot, such as <code>position</code"
|
|
">, <code>orientation</code>, etc. In this exercise, this element is not"
|
|
" compulsory, as we will not need the characteristics of the bot in the"
|
|
" function."
|
|
msgstr ""
|
|
"<code><a cbot|object>object</a>::</code>\n"
|
|
"Quando você escreve isso na frente do nome da função, você pode ter acesso na"
|
|
" função a todas as características do robô, como <code>position</code>, <code"
|
|
">orientation</code>, etc. Neste exercício, este elemento não é obrigatório,"
|
|
" pois não precisaremos das características do robô na função."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:33
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code>Square ( )</code>\n"
|
|
"This is the name of the function. You can call it Square, or any other name."
|
|
msgstr ""
|
|
"<code>Quadrado ( )</code>\n"
|
|
"Este é o nome da função. Você pode chamá-lo de Quadrado ou qualquer outro"
|
|
" nome."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:36
|
|
#, no-wrap
|
|
msgid ""
|
|
"<code><a cbot|float>float</a> length</code>\n"
|
|
"Here you define the parameters that the function will get when it is called."
|
|
" The first time the function is actually called with <code>Square(15)</code>,"
|
|
" the variable <code>length</code> will contain the value <code>15</code>. The"
|
|
" second time, <code>length</code> will contain <code>25</code>."
|
|
msgstr ""
|
|
"<code><a cbot|float>float</a> comprimento</code>\n"
|
|
"Aqui você define os parâmetros que a função receberá quando for chamada."
|
|
" A primeira vez que a função é chamada com <code>Quadrado(15)</code>,"
|
|
" a variável <code>comprimento</code> conterá o valor <code>15</code>. A"
|
|
" segunda vez, <code>comprimento</code> conterá <code>25</code>."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:39
|
|
#, no-wrap
|
|
msgid "Here is in detail what will happen when the program is executed:"
|
|
msgstr ""
|
|
"Aqui está em detalhes o que acontecerá quando o programa for executado:"
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:40
|
|
#, no-wrap
|
|
msgid "First the main function <code>Function</code> will be executed."
|
|
msgstr "Primeiro a função principal <code>Funcao1</code> será executada."
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:41
|
|
#, no-wrap
|
|
msgid ""
|
|
"At the line <code>Square(15)</code>, the program will follow the red arrow"
|
|
" and enter the function <code>Square</code> a first time, <code>length</code>"
|
|
" containing <code>15</code>."
|
|
msgstr ""
|
|
"Na linha <code>Quadrado(15)</code>, o programa seguirá a seta vermelha e"
|
|
" entrará na função <code>Quadrado</code> pela primeira vez, <code"
|
|
">comprimento</code> contendo <code>15</code>."
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:42
|
|
#, no-wrap
|
|
msgid ""
|
|
"At the end of the function <code>Square</code>, the program follows the"
|
|
" orange arrow and comes back to the main function."
|
|
msgstr ""
|
|
"No final da função <code>Quadrado</code>, o programa segue a seta laranja e"
|
|
" volta para a função principal."
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:43
|
|
#, no-wrap
|
|
msgid ""
|
|
"At the line <code>Square(25)</code>, the program will follow the blue arrow"
|
|
" and enter the function <code>Square</code> a second time."
|
|
msgstr ""
|
|
"Na linha <code>Quadrado(25)</code>, o programa seguirá a seta azul e entrará"
|
|
" na função <code>Quadrado</code> uma segunda vez."
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:44
|
|
#, no-wrap
|
|
msgid ""
|
|
"At the end of the function <code>Square</code>, the program follows the light"
|
|
" blue arrow and comes back to the main function."
|
|
msgstr ""
|
|
"No final da função <code>Quadrado</code>, o programa segue a seta azul clara"
|
|
" e volta para a função principal."
|
|
|
|
#. type: Image filename
|
|
#: ../help/help.E.txt:46
|
|
#, no-wrap
|
|
msgid "tproc1b"
|
|
msgstr "tproc1b"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:47
|
|
#, no-wrap
|
|
msgid ""
|
|
"In the function <code>Square</code>, use the instructions <code><a cbot|move"
|
|
">move</a></code> and <code><a cbot|turn>turn</a></code>. In order to make it"
|
|
" shorter, you can use a <code><a cbot|for>for</a></code> loop, that will"
|
|
" repeat the instructions <code><a cbot|move>move</a></code> and <code><a"
|
|
" cbot|turn>turn</a></code> 4 times; however, this is not compulsory."
|
|
msgstr ""
|
|
"Na função <code>Quadrado</code>, use as instruções <code><a cbot|move>move</a"
|
|
"></code> e <code><a cbot|turn>turn</a></code>. Para torná-lo mais curto, você"
|
|
" pode usar um laço <code><a cbot|for>for</a></code>, que irá repetir as"
|
|
" instruções <code><a cbot|move>move</a></code> e <code><a"
|
|
" cbot|turn>turn</a></code> 4 vezes; no entanto, isso não é obrigatório."
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:49
|
|
#, no-wrap
|
|
msgid ""
|
|
"void object::Square(float length)\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i=i+1 )\n"
|
|
"\t{\n"
|
|
"\t\tmove(length);\n"
|
|
"\t\tturn(90);\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"void object::Quadrado(float comprimento)\n"
|
|
"{\n"
|
|
"\tfor ( int i=0 ; i<4 ; i=i+1 )\n"
|
|
"\t{\n"
|
|
"\t\tmove(comprimento);\n"
|
|
"\t\tturn(90);\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: \t; header
|
|
#: ../help/help.E.txt:58
|
|
#, no-wrap
|
|
msgid "See also"
|
|
msgstr "Veja também"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:59
|
|
#, no-wrap
|
|
msgid ""
|
|
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category"
|
|
">categories</a>."
|
|
msgstr ""
|
|
"<a cbot>Programação</a>, <a cbot|type>tipos</a> e <a cbot|category"
|
|
">categorias</a>."
|
|
|
|
|