From: je@bton.ac.uk (John English)
Subject: Re: Record comparision ?
Date: 1998/06/08
Date: 1998-06-08T00:00:00+00:00 [thread overview]
Message-ID: <6lgn91$9ta@saturn.brighton.ac.uk> (raw)
In-Reply-To: 3576214E.E7814E6B@adca01.enet.dec.com
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
-----------------------------------------------------------------
prev parent reply other threads:[~1998-06-08 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-04 0:00 Record comparision ? Prateek S Fulzele
1998-06-03 0:00 ` Mark Fisher
1998-06-05 0:00 ` Niklas Holsti
1998-06-08 0:00 ` John English [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox