symmetric difference
From Free Pascal wiki
Jump to navigationJump to search
><
The symmetric difference operator is applicable to set variables. By math definition, A >< B is (A-B) joined with (B-A).
// make operator overloading available
{$mode objfpc}
procedure test_differ;
var
a: set of char = ['a', 'b', 'c', 's'];
b: set of char = ['b', 'c', 'x', 'y'];
c: set of char;
begin
c:= a >< b; // c becomes ['a', 's', 'x', 'y']
end;
single characters |
|
character pairs |
|