Merci Philippe,
As you say I think it would be usefull if we could have such a function.
Now, a question about your function. If I declare something like:
Type
TDigits = set of 0..9;
Var
Digits : TDigits;
Cardin: integer;
I would call your function like this:
Cardin := Card( Digits, sizeof(TDigits) );
or
Cardin := Card( Digits, 2 );
Which means that size is the size in bytes (not in bits) occupied by the
variable.
Jacques
> There is no built-in function and, like you, I think there should be, just
> as there should be sets beyond 256 elements. Many years ago, I wrote a
> universal bit counter, which follows.
> ---------------
> FUNCTION card (var tar; size: integer): integer; assembler; file://tested