2. Finding Your Way Around

There are four modes that Palm Basic can be in. Each has a specific function. They are covered below individually.

2.1 The Program Manager

This is always the first screen that you see when you launch Palm Basic. It behaves very like the first screen in memo pad. From here, you can view the programs you have written, add new programs and shuffle programs around. Note that programs are organised into categories. A category is simply a name that describes a set of programs.

Here is a list of what you can achieve from this screen:

  • Create a new program by pressing the 'new' button. You will be prompted for a name - enter a unique name for the program. You can change this later if required. You will then be taken to the editor. This program will be created in the current category, or 'Unfiled' if you are currently showing all categories. This too can be changed later.
  • Select an existing program by tapping it with the pen. This will take you to the editor, allowing you to run or modify this program.
  • Change the current category - this will change the set of programs displayed in the manager. You do this with the category control in the top right.
  • Edit the current set of categories. You can add categories, renames categories and delete categories. You do this by selecting the category control in the top right, then touching 'Edit Categories...' with your stylus.
  • Move programs up and down. You do this by touching the name of the program you wish to move, then dragging it up or down. A dotted line will show you where the program will be placed.
  • From the menu, you can select Console, or you can use the shortcut key 'C'. This will take you to the console screen.


    2.2 The Console Screen

    The console screen is always initially blank, except for a flashing cursor at the top left. You can return to the program manager at any point, by selecing Manager from the menu or with the shortcut key 'M'.

    The purpose of the console screen is to allow you to type basic statements and have them executed immediately. For instance, try typing in:

    for a = 1 to 10:print a:next a

    You should see a screen similar to this:

    You can recall the last ten commands you typed in this session. Use the Up and Down buttons to do this. You may then modify these commands before executing them. This is useful if you enter a command incorrectly, or you wish to enter many similar commands.

    You can assign values to variables and create arrays from the console. These will be remembered throughout your session, but will be deleted once you leave the screen.

    You can also execute programs you have written from the console. Do this by entering their name on a single line with no spaces at the beginning or end. Note that variables set up before the program executes will not be cleared, and variables created by the program will be visible at the end. This has one problematic side-effect - if your program uses arrays, and you try to run it twice from the console, the second time around will cause an error when the program tries to Dim an already-existing array.

    2.3 The Editor

    The Editor allows you to write and run programs. It also contains the Properties dialog that allows you to rename a pogram, delete a program or change a program's category. It is much like memo pad; however there is one important difference. In line with most code editors, the editor does not wrap lines of text. Rather, it uses horizontal scroll bars to allow you to see very long lines.

    2.4 Program execution

    This screen shows the results of running your program. After the program has finished executing, you can run it again, or return to the editor. Note that variables are not preserved between successive runs of a program. When a program is requesting data, you can use any of the usual buttons (home, calculator, memopad etc) to leave Palm Basic. Note that the program will not still be running when you next launch Palm Basic - you will return to the manager as always. If a program is executing a long loop and you wish to interrupt its progress, press the power button. This will break the execution.