[fpc-pascal] Re: MacMode More Info
Pierre Paré
pare.p at videotron.ca
Tue May 12 05:17:37 CEST 2009
> The results of your email command are provided below. Attached is your
> original message.
>
> - Results:
> Invalid confirmation string. Note that confirmation strings expire
> approximately 3 days after the initial subscription request. If your
> confirmation has expired, please try to re-submit your original
> request or
> message.
>
> - Unprocessed:
> confirm --------------------------------------------------
> - Done.
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 exception
AccessViolation
Objects need to be dynamicaly created first
ObjectVariable := new (TObjectType,Init) does not compile , compile
error : type identifier expected
NEW(ObjectVariable) ; ObjectVariable.init ;
ObjectVariable := TObjectType.Init ; works
They 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)
More information about the fpc-pascal
mailing list