Difference between revisions of "symmetric difference"
From Lazarus wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
<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> </div> | <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> </div> | ||
− | The symmetric difference operator is applicable to [[ | + | The symmetric difference operator is applicable to [[Set]] variables. By mathematical definition, A >< B is (A-B) joined with (B-A). |
<syntaxhighlight lang="pascal" highlight="7"> | <syntaxhighlight lang="pascal" highlight="7"> |
Revision as of 12:32, 11 November 2018
><
The symmetric difference operator is applicable to Set variables. By mathematical definition, A >< B is (A-B) joined with (B-A).
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 |
|