Re: Array comparison

From: Nicolai Hansen (nic_at_aub.dk)
Date: 10/09/04


Date: 9 Oct 2004 00:02:55 -0700


*snip*

> I think I understand. You're saying that if arrays and records are
> comparable, then objects should also be comparable -- more than just by
> reference -- right?

Yes :) There should be no difference if you has an array type, or
encapsulate that array type in an object. [if I want to make my
strings type TStr=object length: byte; str: array of char; end; I
should be able to compare these two...]

> But if objects are going to be compared deeply, then they should be
> assigned deeply, and that will break everything. Everything.

Yes. In Pascal it would :) Because Pascal got the major weakness that
objects are ALWAYS references - and what I am trying to say is that
this might be the whole reason array types are not comparable.



Relevant Pages

  • Re: Second class coding :(
    ... >Properties of an array type cannot be published. ... are not fully supported by the streaming system. ... The key word looks to be 'Published' ...
    (alt.comp.lang.borland-delphi)
  • Re: Read Format
    ... Marina wrote: ... I'm still unable to find the precision error / problem. ... where the variable l2_error (array type) reaches a ...
    (comp.lang.fortran)