To help the PocketC beginner, here are several pieces of sample code that demonstrate
different parts of PocketC's functionality. Once you look through these to get the basic
understanding, there are numerous user-written applets on the OrbWorks PalmOS Resource page to delve
into.
Source File |
Description |
hello.c |
The standard beginner's program for any language. When run, it pops up an alert saying
"Hello, World!" |
draw.c |
A simple sketching program. Demonstrates basic events, and basic graphics. |
event.c |
An enhanced sketching applet, with a response to all possible events. |
TicTac.c |
A complete applet, implementing the classic game tic-tac-toe, without any intelligence
(CPU moves are selected randomly). |
memo.c |
Demonstrates reading and writing to a memo pad entry. |
dbase.c |
Demonstrates reading and writing to a simple database, using the simple database
functions. |
dbenum.c |
Demonstrates enumerating databases via dbenum(). |
todo.c |
Demonstration reading and writing to a complex database (the ToDo database), using the
extended database functions. Also uses dynamic memory. |
strtoc.c |
Demonstrates the malloc(), free(), strtoc(), and ctostr() functions. |
strings.c |
Demonstrates the string functions. |
datetime.c |
Demonstrates the date and time functions. |
chat.c |
Serial chat applet, demonstrating the serial I/O functions. |
calc.c
calc_framework.c |
A four function calculator. This is a full fledged applet which demonstrates several
advanced concepts, such as simulated structures, linked-lists, memory management, and
indirect function calls. This applet creates an event-based framework based on buttons
with associated callback functions and builds a simple calculator on top of it. |