|
|||||
|
LanguageThe PocketC language is easy to learn, and efficient to program with. PocketC is based on the syntax of C, but simplifies and extends it. To give you a quick impression, here is a brief introduction to the language. Complete documentation is available in the PocketC download. Features
Example As an example of what PocketC code looks like, the following is the source code to an application that draws the famous Sierpinsky's triangle. // Triangle int tx[3], ty[3], x, y; main() { int i, r; tx[0] = 80; ty[0] = 24; tx[1] = 10; ty[1] = 150; tx[2] = 150; ty[2] = 150; r = random(3); x = tx[r]; y = ty[r]; graph_on(); title("Sierpinsky's Triangle"); while (true) { r = random(3); x = (x + tx[r])/2; y = (y + ty[r])/2; line(1, x, y, x, y); } } |
Copyright (c) 1997-2023 OrbWorks |