Anonymous
public text v1 · immutableprocedure TForm1.Button1Click(Sender: TObject);
var
test : Set of TIdIRCUserMode;
modes : Array[1..3] of TIdIRCUserMode;
i:Integer;
blah : TIdIRCUsermode;
begin
test := [aminvisible, amAway];
modes[1] := aminvisible;
modes[2] := amAway;
modes[3] := blah; // absichtlich etwas angeben, was nicht im stanni array ist!
for i:= 1 to 3 do
if modes[i] in test
then showMessage(IntToStr(i)+' is in Test')
else showMessage(IntTostr(i)+' is not in Test');
end;