PocketC is a PalmOS-based compiler that can take source code from a memo and compile it to bytecode that will run in the PocketC virtual machine. Currently there is no way to create a standalone application with PocketC (the PocketC application is required to run any applet that you create.
PocketC version 4.1 (with which this file came) is shareware with registration
available at PalmGear HQ.
The latest version will always be available at the OrbWorks
homepage. In addition to the joy and pride that registration provides, registered users
also have access to special tools, such as BuildPRC a .prc stub builder. See the OrbWorks website for more info.
In addition to the features of the PocketC compiler on the device, PocketC Desktop Edition can build standalone applications.
Language reference
Library routines reference
Developing native libraries
Applets are installed the same way normal applications are installed. Run the Palm Install Tool, select the applet database you want to install, and HotSync.
Source code can be copied from your computer by running the Palm Desktop application, creating a new memo, and copying the source code to the new memo.
A PocketC applet is written as a memopad record or a doc file. The first line of the
source code must be a
comment (//-style) which states the name of the applet. If the source code is a
doc file, it's name must end in ".c" or ".pc" in order to be
displayed in he compile dialog.
Example: // Hello World
.
You may also write source code on your computer, copy it to a memo (with the Palm Desktop
software), and Hotsync.
Press the Compile button. Select the source file that you would like to compile, and press Compile. In the case of an error, an alert will popup to indicate the location and type of the first error.
Select a compiled applet from the list, and press Execute. The Output form will open, and your applet will run. When the applet exits (either normally or by pressing the Done button), the main form reappears. To switch back to the Output form, press the output button.
Backing up an applet is a way to share the compiled form of an applet without sharing the source. To backup an individual applet, select it from the main form, and choose Backup... from the Applet menu. The applet will be backed up at the next HotSync.
Some applets will create databases to store preferences or other useful data. However, if you delete an applet, you may also want to delete the database(s) that it created. To do this, select the Applet | Databases... menu item. A list of user databases will be presented. Press the Delete... button to delete the selected database.
Rather than using MemoPad to edit your source code, you can use the numerous doc editors available. A doc file's name must end in .c or .pc to show up in the Compile dialog, and must have the applet name as a // comment on the first line. The applet name may not be the same as the doc file name. Doc files that are "include"d do not have file name restrictions. Many doc editors support automatic bookmarks by beginning a line with a special character/word and including that character/word in angle brackets at the end of the file. To use bookmarks in PocketC source files, you must specify the bookmark character as the backtick `. This is very useful for adding bookmarks at the the location of functions. The uncompressed size of a doc file must be less than 64K.