There are also a variety of Palm coding conventions that are useful to know. There are type conventions and standard naming practices for everything from functions to managers. It is worth getting a clearer idea of what these are before wading knee-deep into your first coding project. These are the ones you should learn.
Here are the main types used by the Palm OS:
An unsigned 32-bit integer.
A signed 32-bit integer.
An unsigned 16-bit integer.
A signed 16-bit integer.
An unsigned 8-bit integer.
A signed 8-bit integer.
A 1-byte true or false value.
A 1-byte character that will only work on systems with 1-byte encodings.
A 2-byte character suitable for all encodings (including for Japanese, Chinese, and so on).
A 2-byte integer used
for errors. The value
errNone signifies no error.
A signed 2-byte integer used to represent a screen or window coordinate.
Specifies a (4-byte) pointer to an allocated chunk in memory.
A (4-byte) reference to a relocatable chunk of memory (see Chapter 6 for more details).
The Palm OS uses mixed-case for names, with an initial uppercase for functions and types. Constants and enumerations begin with lowercase letters. The following snippet of code shows the conventions in action (emphasis shows functions, types, and enumerations):