Warning, /education/kturtle/doc/glossary.docbook is written in an unsupported language. File is not indexed.
0001 <chapter id="Glossary"> 0002 <title>Glossary</title> 0003 0004 <para>In this chapter you will find an explanation of most of the <quote>uncommon</quote> words that are used in the handbook.</para> 0005 0006 <glosslist> 0007 <glossentry id="degrees"> 0008 <glossterm>degrees</glossterm> 0009 <glossdef><para>Degrees are units to measure angles or turns. A full turn is 360 degrees, a half turn 180 degrees and a quarter turn 90 degrees. The commands <userinput>turnleft</userinput>, <userinput>turnright</userinput> and <userinput>direction</userinput> need an input in degrees.</para></glossdef> 0010 </glossentry> 0011 0012 <glossentry id="input-output"> 0013 <glossterm>input and output of commands</glossterm> 0014 <glossdef><para>Some commands take input, some commands give output, some commands take input <emphasis>and</emphasis> give output and some commands neither take input nor give output.</para> 0015 <para>Some examples of commands that only take input are: 0016 <screen> 0017 forward 50 0018 pencolor 255,0,0 0019 print "Hello!" 0020 </screen> 0021 The <userinput>forward</userinput> command takes <userinput>50</userinput> as input. <userinput>forward</userinput> needs this input to know how many <glossterm linkend="pixels">pixels</glossterm> it should go forward. <userinput>pencolor</userinput> takes a color as input and <userinput>print</userinput> takes a string (a piece of text) as input. Please note that the input can also be a container. The next example illustrates this: 0022 <screen> 0023 $x = 50 0024 print $x 0025 forward 50 0026 $str = "hello!" 0027 print $str 0028 </screen></para> 0029 0030 <para>Now some examples of commands that give output: 0031 <screen> 0032 $x = ask "Please type something and press OK... thanks!" 0033 $r = random 1,100 0034 </screen> 0035 The <userinput>ask</userinput> command takes a string as input, and outputs the number or string that is entered. As you can see, the output of <userinput>ask</userinput> is stored in the container <userinput>x</userinput>. The <userinput>random</userinput> command also gives output. In this case it outputs a number between 1 and 100. The output of the random is again stored in a container, named <userinput>r</userinput>. Note that the containers <userinput>x</userinput> and <userinput>r</userinput> are not used in the example code above.</para> 0036 0037 <para>There are also commands that neither need input nor give output. Here are some examples: 0038 <screen> 0039 clear 0040 penup 0041 </screen> 0042 </para></glossdef> 0043 </glossentry> 0044 0045 <glossentry id="intuitive-highlighting"> 0046 <glossterm>intuitive highlighting</glossterm> 0047 <glossdef><para>This is a feature of &kturtle; that makes coding even easier. With intuitive highlighting the code that you write gets a color that indicates what type of code it is. In the next list you will find the different types of code and the color they get in <link linkend="the-editor">the editor</link>. 0048 <table> 0049 <title>Different types of code and their highlight color</title> 0050 <tgroup cols="3"> 0051 <tbody> 0052 <row> 0053 <entry>regular commands</entry> 0054 <entry>dark blue</entry> 0055 <entry>The regular commands are described <link linkend="commands">here</link>.</entry> 0056 </row> 0057 <row> 0058 <entry>execution controlling commands</entry> 0059 <entry>black (bold)</entry> 0060 <entry>These special commands control execution, read more on them <link linkend="controlling-execution">here</link>.</entry> 0061 </row> 0062 <row> 0063 <entry>comments</entry> 0064 <entry>gray</entry> 0065 <entry>Lines that are commented start with a comment characters (#). These lines are ignored when the code is executed. Comments allow the programmer to explain a bit about his code or can be used to temporarily prevent a certain piece of code from executing.</entry> 0066 </row> 0067 <row> 0068 <entry>brackets {, }</entry> 0069 <entry>dark green (bold)</entry> 0070 <entry>Brackets are used to group portions of code. Brackets are often used together with <link linkend="controlling-execution">execution controllers</link>.</entry> 0071 </row> 0072 <row> 0073 <entry>the <link linkend="learn">learn</link> command</entry> 0074 <entry>light green (bold)</entry> 0075 <entry>The <link linkend="learn">learn</link> command is used to create new commands.</entry> 0076 </row> 0077 <row> 0078 <entry>strings</entry> 0079 <entry>red</entry> 0080 <entry>Not much to say about (text) strings either, except that they always start and end with the double quotes (").</entry> 0081 </row> 0082 <row> 0083 <entry>numbers</entry> 0084 <entry>dark red</entry> 0085 <entry>Numbers, well not much to say about them.</entry> 0086 </row> 0087 <row> 0088 <entry>boolean values</entry> 0089 <entry>dark red</entry> 0090 <entry>There are exactly two boolean values, namely: true and false.</entry> 0091 </row> 0092 <row> 0093 <entry>variables</entry> 0094 <entry>purple</entry> 0095 <entry>Start with a '$' and can contain numbers, strings or boolean values.</entry> 0096 </row> 0097 <row> 0098 <entry>mathematical operators</entry> 0099 <entry>gray</entry> 0100 <entry>These are the mathematical operators: <userinput>+</userinput>, <userinput>-</userinput>, <userinput>*</userinput>, <userinput>/</userinput> and <userinput>^</userinput>.</entry> 0101 </row> 0102 <row> 0103 <entry>comparison operators</entry> 0104 <entry>light blue (bold)</entry> 0105 <entry>These are the comparison operators: <userinput>==</userinput>, <userinput>!=</userinput>, <userinput><</userinput>, <userinput>></userinput>, <userinput><=</userinput> and <userinput>>=</userinput>.</entry> 0106 </row> 0107 <row> 0108 <entry>boolean operators</entry> 0109 <entry>pink (bold)</entry> 0110 <entry>These are the boolean operators: <userinput>and</userinput>, <userinput>or</userinput> and <userinput>not</userinput>.</entry> 0111 </row> 0112 <row> 0113 <entry>regular text</entry> 0114 <entry>black</entry> 0115 <entry></entry> 0116 </row> 0117 </tbody> 0118 </tgroup> 0119 </table> 0120 </para></glossdef> 0121 </glossentry> 0122 0123 <glossentry id="pixels"> 0124 <glossterm>pixels</glossterm> 0125 <glossdef><para>A pixel is a dot on the screen. If you look very close you will see that the screen of your monitor uses pixels. All images on the screen are built with these pixels. A pixel is the smallest thing that can be drawn on the screen.</para> 0126 <para>A lot of commands need a number of pixels as input. These commands are: <userinput>forward</userinput>, <userinput>backward</userinput>, <userinput>go</userinput>, <userinput>gox</userinput>, <userinput>goy</userinput>, <userinput>canvassize</userinput> and <userinput>penwidth</userinput>.</para> 0127 <para>In early versions of &kturtle; the canvas was essentially a raster image, yet for recent versions the canvas is a vector drawing. This means that the canvas can be zoomed in and out, therefore a pixel does not necessarily have to translate to one dot on the screen.</para> 0128 </glossdef> 0129 </glossentry> 0130 0131 <glossentry id="rgb"> 0132 <glossterm>RGB combinations (color codes)</glossterm> 0133 <glossdef><para>RGB combinations are used to describe colors. The <quote>R</quote> stand for <quote>red</quote>, the <quote>G</quote> stands for <quote>green</quote> and the <quote>B</quote> stands for <quote>blue</quote>. An example of an RGB combination is <userinput>255,0,0</userinput>: the first value (<quote>red</quote>) is 255 and the others are 0, so this represents a bright shade of red. Each value of an RGB combination has to be in the range 0 to 255. Here a small list of some often used colors: 0134 <table frame="none"> 0135 <title>Often used RGB combinations</title> 0136 <tgroup cols="2" colsep="5" rowsep="1"> 0137 <colspec colname="c1"/> 0138 <tbody> 0139 <row><entry><userinput>0,0,0</userinput></entry><entry>black</entry></row> 0140 <row><entry><userinput>255,255,255</userinput></entry><entry>white</entry></row> 0141 <row><entry><userinput>255,0,0</userinput></entry><entry>red</entry></row> 0142 <row><entry><userinput>150,0,0</userinput></entry><entry>dark red</entry></row> 0143 <row><entry><userinput>0,255,0</userinput></entry><entry>green</entry></row> 0144 <row><entry><userinput>0,0,255</userinput></entry><entry>blue</entry></row> 0145 <row><entry><userinput>0,255,255</userinput></entry><entry>light blue</entry></row> 0146 <row><entry><userinput>255,0,255</userinput></entry><entry>pink</entry></row> 0147 <row><entry><userinput>255,255,0</userinput></entry><entry>yellow</entry></row> 0148 </tbody> 0149 </tgroup> 0150 </table> 0151 </para> 0152 <para>Two commands need an RGB combination as input: these commands are <userinput>canvascolor</userinput> and <userinput>pencolor</userinput>.</para></glossdef> 0153 </glossentry> 0154 0155 <glossentry id="sprite"> 0156 <glossterm>sprite</glossterm> 0157 <glossdef><para>A sprite is a small picture that can be moved around the screen. Our beloved turtle, for instance, is a sprite. 0158 <note><para>With this version of &kturtle; the sprite cannot be changed from a turtle into something else. Future versions of &kturtle; will be able to do this.</para></note></para></glossdef> 0159 </glossentry> 0160 0161 </glosslist> 0162 0163 </chapter>