]> The KLogoTurtle Handbook Euclides Chuma
euclideschuma@yahoo.com.br
August/2003 1.0 The KLogoTurtle is a interpreter of the LOGO language for KDE desktops. KDE KLogoTurtle
Introduction Features The KLogoTurtle is a useful tool for teaching geometry and principles basics of the programming of computer. Childrens can to study mathematic of mode grasping and constructive. KLogoTurtle support commands in several languages. KLogoTurtle is under license GPL and it developed in KDevelop by Euclides Chuma. Installation Requirements KLogoTurtle request KDE 3.1 Compilation and Installation Compiling KLogoTurtle is very easy. The following should do it: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. 4. You can remove the program binaries and object files from the source code directory by typing `make clean'. That should do it! Should you run into any problems, please report them to the author Using KLogoTurtle To use KLogoTurtle is very easy, just type the commands and click Run button. Tips The following tips are importants: Use one command in each line. The variables names are not sensitive case. The numbers are integers positives. Commands The commands to KLogoTurtle in english are: FORWARD Move to forward producing a line. Format: FORWARD ?? (?? is the quantity of steps) Example: FORWARD 50 BACKWARD Move to backward producing a line. Format: BACKWARD ?? (?? is the quantity of steps) Example: BACKWARD 50 LEFT Rotate to left changing the direction. Format: LEFT ?? (?? is the quantity of degrees) Example: LEFT 90 RIGHT Rotate to right changing the direction. Format: RIGHT ?? (?? is the quantity of degrees) Example: RIGHT 90 SETX Move to position of the axis X. Format: SETX ?? (?? is the position) Example: SETX 100 SETY Move to position of the axis Y. Format: SETY ?? (?? is the position) Example: SETY 100 PENDOWN Down the pen drawing into screen. Format: PENDOWN Example: PENDOWN PENUP Up the pen not drawing into screen. Format: PENUP Example: PENUP PENCOLOR Change the pen color. Color might to be Green, Red, Blue, Black, Yellow, Gray, Darkblue, Darkgreen, Darkred, Darkyellow. Format: PENCOLOR ?? (?? is the color) Example: PENCOLOR RED CLEAR Clear the screen. Format: CLEAR Example: CLEAR HOME Move to center position. Format: HOME Example: HOME HIDETURTLE Hide cursor. Format: HIDETURTLE Example: HIDETURTLE SHOWTURTLE Show cusor. Format: SHOWTURTLE Example: SHOWTURTLE NEW Start a new drawing. Format: NEW Example: NEW MAKE Define a variable with a integer number. Format: MAKE name = ?? (?? is a integer number) Example (define variable TEST with 100): MAKE TEST = 100 CONTENT Show the content of the variable. Format: CONTENT variable Example: CONTENT TEST SUM Sum two integers positive and put result into a variable. Format: SUM variable = ?? + ?? (?? is a integer number) Example: SUM TEST = 10 + 20 SUBTRACT Subtract two integers positive and put result into a variable. Format: SUBTRACT variable = ?? - ?? (?? is a integer number) Example: SUBTRACT TEST = 30 - 10 MULTIPLY Multiply two integers positive and put result into a variable. Format: MULTIPLY variable = ?? * ?? (?? is a integer number) Example: MULTIPLY TEST = 20 * 20 DIVIDE Divide two integers positive and put result into a variable. Format: DIVIDE variable = ?? / ?? (?? is a integer number) Example: DIVIDE TEST = 30 / 5 REMAINDER Divide two integers positive and put remainder into a variable. Format: REMAINDER variable = ?? / ?? (?? is a integer number) Example: REMAINDER TEST = 50 / 6 REPEAT Repeat several times a set of commands. Format: REPEAT ?? (?? is the quantity of times) commands END REPEAT Example: (draw a square) REPEAT 4 FORWARD 50 LEFT 90 END REPEAT TO Define a set of commands with single name. Format: TO name commands END TO Example: (define a square and draw it) TO SQUARE FORWARD 50 LEFT 90 FORWARD 50 LEFT 90 FORWARD 50 LEFT 90 FORWARD 50 LEFT 90 END TO SQUARE IF Execute the commands if condition is true. Format: (=, <, >, !) IF ?? = ?? (?? is integer number) commands END IF Example: (draw a line) IF 10 < 100 FORWARD 50 END IF