Page 150 - The Ultimate Palm Robot
P. 150

Color profile: Generic CMYK printer profile
           Composite  Default screen
                                                          Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 6






                                                      Chapter 6  The Palm Robot Programmer (PRP)     133



                                        ❏ Delete Subroutine   Deletes a Subroutine block, and all the
                                           blocks within the Subroutine from the program

                                      The Tools menu contains the Convert To option:
                                        ❏ Convert To   Converts a PRP program into source code. There are
                                           three submenu choices for Convert: Basic, Java, and TEA. Each
                                           option translates the program to the named language.
                                      The About menu contains the single item, About, which displays the ver-
                                    sion number of the program. The toolbar contains quick-access buttons for
                                    many of the menu options you’ve just seen.


                                                                              Cut   Copy  Paste   Delete







                                      New   Open  Save          Convert


                                    The Component Palette

                                    On the left side of the main window is the component palette. This contains
                                    icons for all the programming components you can use within your pro-
                                    grams. It includes components for loops, logical decisions, variables, subrou-
                                    tines, and a few components that are uniquely specific to the PPRK.

                                    The Variable Component   This block allows you to create variables in your
                                    program. Variables are like aliases for values. They represent values and can
                                    be used to store values that can be used later. This component has a property
                                    for variable name, variable type (more on that coming up) and initial value
                                    (which is an optional property). For example, if we take a reading from a
                                    sensor, we would store the value in a variable. Later we can access that
                                    particular reading by using the variable in the code.

                                      Some languages use the variable type property to identify what data
                                    is stored in a variable. For example, in the Java programming language, a
                                    variable that stores a number cannot be used to store a string of characters.
                                    Although the PRP does not restrict what you enter into the Type box, if you










           P:\010Comp\Bots\880-6\ch06.vp
           Monday, May 12, 2003 1:06:23 PM
   145   146   147   148   149   150   151   152   153   154   155