[fpc-pascal]How to get the values stored in a set
anton.tichawa at chello.at
Tue Dec 3 05:36:40 CET 2002
On Tuesday 03 December 2002 01:33, Karl Brandt wrote:
you can test for an element, e. g. 12, with:
if 12 in Test then ..
to count the elements, you can write somthing like
N := 0;
for I := 1 to 50 do begin
if I in Test then Inc(N);
> I'd like to know how to get the values of a set.
> For example:
> Type TSet = set of 1..50;
> Var Test:TSet;
> Test:=[12 ,25,15]; //set with some alleatory values
> ?? //How can i know that this set has 3 itens and the itens are 12,
> 25 and 15?
> Any help is welcome;
> Thanks in advance;
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal