Difference between revisions of "symmetric difference"
From Free Pascal wiki
Jump to navigationJump to search (Created page with "<div style="float:left; margin: 0 20px 10px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;"><nowiki> >< </nowiki>...") |
(No difference)
|
Revision as of 12:30, 11 November 2018
><
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 |
|