----- Original Message ----- From: "Adriaan van Os" gpc@microbizz.nl
Peter N Lewis wrote:
At 12:40 AM +0200 25/7/03, Frank Heckenbach wrote:
<snip>
Ironically, I have extensive experience with BP objects, but not (much) with objects in Think/MPW/CodeWarrior Pascal on the Macintosh (the reason being my thorough dislike of the object reference model). However, I have access to both GPC, BP and a Macintosh, so, if nobody has the requested information ready, I can do some research (but it would take some time).
In Mac Pascal, each method name must be unique within any object (including inherited objects, recursively). A super-object may override an existing method in an (recursively) inherited object (ie, define a method with an already existing name) , if the new definition exactly matches the old definitions prototype, and the keyword "override" is specified. Otherwise, yes it is an error.
BTW, does MP have `virtual'? Otherwise we should disable this keyword in `--mac-pascal', shouldn't we?
A quick look in the CodeWarrior Pascal Language Reference learns that CW also has the 'inherited" keyword. The GPC manual reads that "‘inherited’ is an Object Pascal and a Borland Pascal extension". However, I can't find it in the Turbo Pascal 6.0 Programmer's Guide, nor can I remember it from my BP days (which is more than a decade ago).
"inherited" is a reserved word in BP 7.0