I have two variables of different types, but dependent, one type being set of
of the other type which is a Enumerated Types
. How do I extract the value of the variable of type set of
(Y in my case below) and assign it to the variable of the enumerated type "X"? In my example, X would have to be equal to "bcA", obligatorily using the "Y" to extract the value.
NOTE: Programming in Delphi 10 with Android.
type
TBaseCom_MODES = (bcA = 0, bcB = 1, bcN = 100);
TBaseCom_MODES_Set = set of TBaseCom_MODES;
var X: TBaseCom_MODES;
Y: TBaseCom_MODES_Set;
begin
Y := [bcA, bcN];
X := Y - [bcN]; // Aqui não funciona. Dá erro
end;