Object Pascal was created by Apple for Lisa and Mac OS, with collaboration from Niklaus Wirth.
Borland then adopted it to Turbo Pascal 5.5 for MS-DOS.
Turbo Pascal 6.0 and 7.0 for MS-DOS, followed by Turbo Pascal 1.0 and 1.5 for Windows 3.x took up ideas from C++.
Borland then rebooted Turbo Pascal with Delphi, but to avoid creating too much confusion among Pascal developers, they kept calling their dialect Object Pascal, even though they completly rebooted the object model.
This is how you declare objects in Object Pascal.
type
PTPoint = ^TPoint;
TPoint = object
x: Integer;
y: Integer;
end;
var
valuePointOnGlobalMemory: TPoint;
valuePointOnTheHeap: PTPoint;
begin
{Can use it right away}
valuePointOnGlobalMemory.x := 10;
valuePointOnGlobalMemory.y := 20;
{Need to heap allocate first}
New(valuePointOnTheHeap);
valuePointOnTheHeap^.x := 10;
valuePointOnTheHeap^.y := 20;
Dispose(valuePointOnTheHeap);
{....}
end.
Easy to test with Free Pascal using Turbo Pascal compatibility mode.Delphi 1.0 was about the time I started focusing on C++, so I am not that knowledgeable about its features. Just remembered that was one of the key changes.