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>...") |
|||
Line 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 set variables. By math definition, A >< B is (A-B) joined with (B-A). | + | The symmetric difference operator is applicable to [[set]] variables. By math definition, A >< B is (A-B) joined with (B-A). |
− | <syntaxhighlight lang="pascal" highlight=" | + | <syntaxhighlight lang="pascal" highlight="7"> |
− | |||
− | |||
procedure test_differ; | procedure test_differ; | ||
var | var |
Revision as of 12:32, 11 November 2018
><
The symmetric difference operator is applicable to set variables. By math 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 |
|