Apple IIGS is a great platform for writing applications. There are many programming languages available, and the most famous set of programming languages came from a company named Byte Works
. It has everything from assembler to Modula-2. But the one I like best, is the language called Orca/Pascal. This is because it has a little hidden gem - it supports the Apple Object Pascal
extension. This makes it a great language for learning Object Oriented Programming!
Object Pascal has very simple object syntax. To define an object type (class), the codes look like this:
snow = object
To define a method, the codes look like this:
x := randomInteger mod 320;
y := randomInteger mod 100;
To access the object's properties and methods, Object Pascal uses the dot syntax like
. If you are interested to know more, you can refer to this article
(although it is written for Mac).
It is so simple that anybody can easily pick up the concept easily. In fact, my 8 years old son Ding Wen did just this. Today he has just written his first object oriented program called Snow.
You can read the source code for Snow here
Ding Wen is now writing his first Object Pascal game called Invader War. If you are now running Firefox or Internet Explorer on a PC, you can test drive Invader War here
I have also written a few Object Pascal demos. You can find some of them here:
- Bouncing Balls
- Space Game
Programming is fun!