From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d5bcc1bc9c136ab7 X-Google-Attributes: gid103376,public From: je@bton.ac.uk (John English) Subject: Re: Record comparision ? Date: 1998/06/08 Message-ID: <6lgn91$9ta@saturn.brighton.ac.uk>#1/1 X-Deja-AN: 360657549 References: <3576214E.E7814E6B@adca01.enet.dec.com> Organization: University of Brighton Newsgroups: comp.lang.ada Date: 1998-06-08T00:00:00+00:00 List-Id: Prateek S Fulzele (prateek@adca01.enet.dec.com) wrote: : type REC_TYPE; : type REC_PTR_TYPE is access REC_TYPE; : type REC_TYPE is : record : INT1 : INTEGER; : INT2 : INTEGER; : end record; : REC_PTR1, REC_PTR2 : REC_PTR_TYPE; : if REC_PTR1 < REC_PTR2 then This compares the access values (pointers). If you want to compare the components, use Rec_Ptr1.Int1 < Rec_Ptr2.Int2, and if you want to compare the complete records, use Rec_Ptr1.all < Rec_Ptr2.all (but then you'll have to define your own "<" operator for Rec_Types, as for Rec_Ptr_Type). ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------