home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!caen!batcomputer!munnari.oz.au!titan!hal!jbm
- From: jbm@hal.trl.OZ.AU (Jacques Guy)
- Subject: Re: Comparing record types
- Message-ID: <1992Nov17.230223.2113@trl.oz.au>
- Sender: root@trl.oz.au (System PRIVILEGED Account)
- Organization: Telecom Research Labs, Melbourne, Australia
- References: <92316.095144F0O@psuvm.psu.edu> <1992Nov13.001219.588@trl.oz.au> <Bxt7yK.L2H@cs.vu.nl>
- Date: Tue, 17 Nov 1992 23:02:23 GMT
- Lines: 22
-
- sbakker@cs.vu.nl (Bakker S) writes:
-
-
- >type aRecord=record x,y,z: integer end;
- > pseudoRecord=packed array [1..SizeOf(aRecord)] of char;
- > ^^^^^^^^^^^^
- >var x,y: aRecord;
- >begin x:=y;
- > if pseudoRecord(x)=pseudoRecord(y) then (*....*)
- >end.
-
- >Now this *will* work, since the runtime code will compare *all* bytes (well,
-
-
- Alas, no, it does not work. I have tried it both in TP5.5 and TP 6.0, and
- at compile time the error message is the same:
-
- "Operand types do not match operator"
-
- But you are right in that other matter: if the first byte of the record is zero,
- then the comparison will return "true" always. I hadn't thought of that.
-
-