Show quoted text 13 lines
Darn. Still not member. Not problem since this is my last post. I found my answer.
It's been a month , I hadn't had the time to follow up on my original question which was
What kind of object is used under Macpas compatibility mode ?
"Object Pascal, Mac style." didn't say much. (http://wiki.freepascal.org/Mode_MacPas )
Any way I did some trial runs. Here what I found : in Macpas compatibilty mode
Objects can not be use as a record ,
objectvariable.field := value ;
objectvariable.init ; compile but cause runtime exceptionAccessViolation
Objects need to be dynamicaly created first
ObjectVariable := new (TObjectType,Init) does not compile , compileerror : type identifier expected
NEW(ObjectVariable) ; ObjectVariable.init ;
ObjectVariable := TObjectType.Init ; worksThey are NOT compatible with (inheritable from) object types from the Objects unit :
TMyCollection = object (TCollection) end ; cause compile error error 31 mix of different kind (class, object, interface, etc isn't allowed
error 37: internal error 200611081
but you can use them
TMyCollection = TCollection ;They are compatible with class types from Classes unit TMyCollection = object (TCollection) end ; works
In conclusion it seems that objects in Macpas mode are references, pointers and not just records
represent the Delphi class sementic instead of the Delphi object sementic
but use "object" keyword instead of "class"
class methods are not allowed
does not need "virtual" keyword but use "override" keyword.
Is that right ?
Who can I send this post to and ask to add the information to the Macpas mode Web page (http://wiki.freepascal.org/Mode_MacPas) and the User's manual (7.1 Free Pascal compiler modes) and the Programmer's manual (Appendix D.6 MAC mode)
