Maximize MenuMinimize Menu

Back | Home

PocketC Architect Tutorial
Hello Classic World - main() function

In this tutorial you will create the classic Hello World program using PocketC Architect. This tutorial demonstrates the use of a main() function in PocketC Architect.

// PocketC Architect Hello World
// Hello Classic World - main() function example

// app declaration
@app myApp {
creator = "HELC"; // creator id
name = "Hello"; // display name
dbname = "Hello-HELC"; // name of .prc database
}

main()
{
alert("Hello world!");
}

1. Once you've downloaded and installed PocketC Architect start a new file and name it hello_classic.oc. The whole project will be one simple .oc file and the .prc file compiled for Palm. Cut and paste the source code above.


2. Be sure the Palm Emulator is running and select Project | Build Project.


3. Check Generate standalone application and select Compile.

 

4. A standalone .prc file will be generated in the same directory as your source code file and be loaded onto the Palm Emulator.



©Copyright TrajectoryLabs.com. All Rights Reserved.