Page 155 - The Ultimate Palm Robot
P. 155

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






                    138     The Ultimate Palm Robot












                               The Break Component    If you are inside a While or For component, Break
                               will stop executing the loop immediately and jump to the next component
                               following the For or While component. This component has no properties.









                               The Call Component    Call allows you to call subroutines by name. After the
                               subroutine completes, control of the program passes to whatever component
                               comes after the Call. The properties of this component are the name of the
                               subroutine and a variable in which you can store any return value. If there is a
                               return value, you also need to add a Variable block to declare the variable. If
                               the subroutine does not return a value, the Variable field should be set to
                               empty. Also, you need to ensure if the Subroutine does return a value, that the
                               variable has the same type as the return value. We show you how to create a
                               subroutine in the section “Creating a Subroutine, Function, or Method,” later
                               in this chapter.










                               The Include Component    This block allows you to include another source
                               file into the program. This is provided for TEA and Java programs. TEA
                               allows you to include other source files into a TEA program and call the
                               subroutines in the other source file by name. The property for this component
                               is the name of the source file. For example, if you install the BrainStem
                               software, you will have a directory named \aSystem. This directory contains
                               source code files that you can include. One such source file is aPPRK.tea. If
                               you add an Include block and set the filename property to aPPRK.tea, the
                               source file created for your program will have a statement to include the
                               aPPRK.tea file and you can use aPPRK.tea functions in your program.






           P:\010Comp\Bots\880-6\ch06.vp
           Monday, May 12, 2003 1:06:24 PM
   150   151   152   153   154   155   156   157   158   159   160