Page 179 - The Ultimate Palm Robot
P. 179

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






                    162     The Ultimate Palm Robot



                               Without the end, a program that does not run in an endless loop could easily
                               run past the end and start executing the subroutines, which would be a pro-
                               gram bug.

                                 When you are finished entering the program onto your PDA (or loading it
                               from the Palm Desktop), find and tap the yBasic icon in the Application
                               Launcher. This time the list of programs should show, #HelloWorld.bas. Select
                               the program and then tap the Run button.


















                                 You should see the text “Hello, World!” printed to the screen with a button
                               that says Enter Name below the text. Notice also that HotPaw automatically
                               puts a Quit button at the bottom of the screen. This is what allows us to get out
                               of the infinite loop that is in the code above. When you are finished, tap the
                               Quit button. You will now be back at the program listing screen. If you select
                               the #HelloWorld.bas program, you can tap the Edit button to edit the memo.


                               Some Useful HotPaw Commands and Functions
                               HotPaw Basic makes programming a Palm easy because you don’t have to
                               worry about the details of Palm OS programming. One of those details is all
                               the work in creating forms and form controls such as buttons, message boxes,
                               labels, and so on. Using simple commands or functions, HotPaw handles all
                               the details for you. Table 7-1 lists some of the more common and useful form
                               controls you can use with HotPaw Basic. To find complete details about how
                               to use all the commands and functions of HotPaw Basic, you’ll want to look at
                               quickref.txt and yb_tutorial.txt, both of which come with the software. The
                               file quickref.txt lists all the commands, functions, and keywords you need to
                               know to write BASIC programs for the Palm OS. The file yb_tutorial.txt con-
                               tains many sample programs showing how to use HotPaw Basic.










           P:\010Comp\Bots\880-6\ch07.vp
           Monday, May 12, 2003 4:29:22 PM
   174   175   176   177   178   179   180   181   182   183   184