What is standard, and what isn't?_(re)

Fri, 2 May 1997 03:26:42 +0200 (MET DST)


According to Nils Bokermann:
> How do you want to compare structured variables? Compare member by
> member?

Yes.  Except with types where we know that a simple byte compare
is sufficient.

> I knew a very fine programming language (ELAN) in which it was possible
> to define your own operator (`=', `<>' or whatever you wanted). Is it
> possible to have this as an extension to Pascal?

It's a PXSC extension which is already in GPC:

    Operator = ( x, y: MyType ) result: Boolean;

    begin (* MyType = MyType *)
      result:= ( x.foo = y.foo ) and ( x.bar = y.bar ) or whatever;
    end (* MyType = MyType *);

Greetings,

    Peter

  Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970420] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es