C++, Java and JADE are all object oriented developement languages. This means
that everything is an object which has properties and 'Methods' which are
actions which the object performs.
A D V E R T I S E M E N T
"So what exactly is an object in Pascal?" you ask.
Well, an object in pascal is like a record with the addition of methods
(procedures) which belong to that object.
An object declaration would look something like this...
type
...
thing = Object
property : type;
...
procedure nameofproc;
function nameofFunc (parameters);
end;
...
NOTE: You do not need empty parameter brackets if your procedure has no
parameters.
In the body of the program your procedures/functions etc. will be
called 'thing.nameofproc'. Now within the procedure you can reference the object
by going 'self'. Ok here is an example procedure of an object which adds one to
the objects number property.
...
procedure thing.incNumber;
begin
self.number := self.number + 1;
end;
...WOW! what an amazing procedure! So all of the variables of type 'thing' will
have that method at their diposal. You call the method by going [variable name
here].incNumber or whatever the procedure happens to be called.
There are also
special kinds of procedures called constructors and destructors.
Constructors are supposed to happen when the object is created and destructors
when it is deleted. But since pascal treats objects like variables these must be
called on like a normal procedure. I don't see any particular need to use them,
except that they may increase readability of your code.