Board index » delphi » MW Object Pascal vs Delphi's Pascal

MW Object Pascal vs Delphi's Pascal

Do any develops have opinons on how similar Metrowerk's Object Pascal is
to Delphi's?

I'd particularly welcome comments from developers who have ported
software between the two (in either direction).

Grant

 

Re:MW Object Pascal vs Delphi's Pascal


Quote
In article <3B81FA62.AC28...@clear.net.nz>, Grant Jacobs wrote:
> Do any develops have opinons on how similar Metrowerk's Object Pascal is
> to Delphi's?

[this is a better question for a Delphi group]

Quote
> I'd particularly welcome comments from developers who have ported
> software between the two (in either direction).

I'm not expert, but assuming Metrowerks is compatible with the standard
(http://www.pascal-central.com/OOE-stds.html)

There is some similarity, but they are not compatible. Delphi isn't even
standard pascal compliant.

In the OO realm, Delphi e.g.
- only supports multiple-inheritance via interfaces (like Java),
- no abstract classes, no property classes. properties and abstract methods
(which in practice make the class abstract) exist though.
- Defered classes are declared as type bla=class(parent); so without an
additional end;
- No VIEW OF Class
- Delphi adds dynamic arrays, Default parameters, Overloading, interfaces and
dispinterfaces, variants.

On the standard Pascal side, things that are different are:
- First having to declare a procedure type before use.
        (so type proctype=procedure(b:longint);  procedure c(a:proctype); )
- No standard Pascal IO
- Different system for Goto
- No selective NEW for variable records. The biggest size is always allocated.

There is plenty of documentation on the web, e.g. Borlands has a lot of .HLP
files about Delphi. (on FTP in pub/Delphi/techpub or somewhere there)

Other Threads