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
. 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
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:
type snow = object x: integer; y: integer; procedure setup; procedure move; end;
To define a method, the codes look like this:
procedure snow.setup; begin x := randomInteger mod 320; y := randomInteger mod 100; end;
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
(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
. 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
I have also written a few Object Pascal demos. You can find some of them here: -
Programming is fun!