>This is purely syntactical and the help explains this.  In BP7 (old way),
>you always do a '^.', but Borland changed that to '.' in Delphi.  Its not a
>lie.  It is the way Delphi has been designed, and IMHO, is better than the
>'^.' construct, and certainly better than C++'s '.' and '->' constructs.  I
>guess the only down-side to using '.' is that it is used to denote fields
in
>records, thus making its use inconsistent.  

This "implicit referencing" isnt just for objects, you can use it for record
structures as well.

  TRecordA = record
    value : integer;
  end;

  TRecordB = record
    recordA : ^TRecordA;
  end;

  recordB.recordA.value := 123;

>However, IMHO, OO programming ought not to use records anyway.

Why not?  Should something simple like TPoint be an object?  Objects can
also be a nuicense when you just want to hold and pass around simple data.
I still use records or the old BP7 object model sometimes for simple data
types.

i.e.

  TMyPoint = object
  public
    x, y : double;
    function length : double;
    ...
  end;

You can define arrays of them, pass them around by value, you dont have to
dynamically create and destroy them etc etc.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to