program MultiValueExample;
const
ONE = $01;
TWO = $02;
THREE = $04;
FOUR = $08;
procedure MultiValueExample(values: Integer);
begin
if (values and ONE) = ONE then
WriteLn('ONE');
if (values and TWO) = TWO then
WriteLn('TWO');
if (values and THREE) = THREE then
WriteLn('THREE');
if (values and FOUR) = FOUR then
WriteLn('FOUR');
end;
begin
MultiValueExample(ONE or THREE or FOUR);
end.
(*
run:
ONE
THREE
FOUR
*)