Yes, I can use an array, but I don't like it here. Actually I use the set as
a parameter for passing the values to a function, and most time I need only
one or two values to be passed. Only occasionally pass more values. So in
most time I have to ignore all other values or giving the dumb values except
one or two that I need. The program will look ugly. Don't you think so?
Jim
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Cory Shanks
Sent: Friday, 19 February 1999 16:46
To: Multiple recipients of list delphi
Subject: RE: [DUG]: about SET
Is there any reason you can't use an array instead?
Cheers,
Cory Shanks
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Jim Zheng
> Sent: Friday, 19 February 1999 16:29
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: about SET
>
>
> So that means, there is not faster way than looping through whole set to
> check each one from base type appears in the set.
> But is there any faster way to know the count of a set, or looping is the
> only way?
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
> Behalf Of Cooke, Andrew
> Sent: Friday, 19 February 1999 16:13
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: about SET
>
> However, you can declare a set as:
> type
> TMyset = set of TMytype;
>
> and High() will work for TMyType.
>
> The help explicitly states that order has no meaning in a set, so
> you cannot
> find out the order of the elements in a set - you can only iterate through
> the elements of the base type and see if they appear in the set.
> Andrew.
>
> > -----Original Message-----
> > From: Peter Hyde [SMTP:[EMAIL PROTECTED]]
> > Sent: Saturday, February 20, 1999 5:09 AM
> > To: Multiple recipients of list delphi
> > Subject: RE: [DUG]: about SET
> >
> >
> > Jim wrote:
> >
> > > I don't think high(setname) works for a set. We maybe confuse
> 'set' and
> > > 'enumerated', don't we?
> >
> > Almost certainly. <g>
> >
> >
> >
> > cheers,
> > peter
> >
> > ==================================================
> > Peter Hyde, SPIS Ltd, Christchurch, New Zealand
> > * TurboNote: http://TurboPress.com/tbnote.htm
> > -- small, FREE and very handy
> > * Print-to-Web automation http://TurboPress.com
> > * Web design, automation and hosting specialists
> > Find all the above and MORE at http://www.spis.co.nz
> >
> --------------------------------------------------------------------------
> > -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz