var a, b, c: set of byte; begin a := [1, 2, 3, 4]; b := [3, 4, 5, 6]; c := a*b;
But be careful:
var a, b, c: set of integer;
not even compiled; instead, you get the value "Sets may have an error of no more than 256 elements." Further information on Delphi can be found in the documentation .
Update
Sorry, forgot to mention the "obvious" (from the point of view of the Delphi programmer):
var a, b, c: set of char; begin a := ['A', 'B', 'C', 'D']; b := ['C', 'D', 'E', 'F']; c := a*b; // c is the intersection of a and b, ie, c = ['C', 'D']
But your characters will be byte characters - that is, forget about Unicode (Delphi 5 does not support Unicode, so this is not a limitation in this case)!
source share