Difference between revisions of "symmetric difference"
From Lazarus wiki
Jump to navigationJump to search (typeset mathematical formula in LaTeX, mention conformity to Extended Pascal, remove manual listing of Category: Symbols already done via transcluded {{Symbols}}) |
|||
Line 1: | Line 1: | ||
− | <div style="float: | + | <div style="float:right; margin: 0 10px 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 mathematical definition, A >< B is (A | + | The symmetric difference operator is applicable to [[Set|<syntaxhighlight lang="pascal" inline>set</syntaxhighlight>]] variables. |
+ | By mathematical definition, <syntaxhighlight lang="pascal" inline style="whitespace: nowrap;">A >< B</syntaxhighlight> is <math>\left( A \setminus B \right) \cup \left( B \setminus A \right)</math>. | ||
<syntaxhighlight lang="pascal" highlight="7"> | <syntaxhighlight lang="pascal" highlight="7"> | ||
Line 14: | Line 15: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | The symmetric difference operator is defined by [[Extended Pascal|Extended Pascal]], ISO standard 10206. | ||
+ | In the [[FPC]] it is available in ''any'' mode, not just [[Mode extendedpascal|<syntaxhighlight lang="delphi" inline style="whitespace: nowrap;">{$mode extendedPascal}</syntaxhighlight>]]. | ||
{{Symbols}} | {{Symbols}} | ||
− |
Latest revision as of 16:03, 27 January 2022
><
The symmetric difference operator is applicable to set
variables.
By mathematical definition, A >< B
is [math]\displaystyle{ \left( A \setminus B \right) \cup \left( B \setminus A \right) }[/math].
procedure test_differ;
var
a: set of char = ['a', 'b', 'c'];
b: set of char = ['b', 'c', 'x', 'y'];
c: set of char;
begin
c:= a >< b; // c becomes ['a', 'x', 'y']
end;
The symmetric difference operator is defined by Extended Pascal, ISO standard 10206.
In the FPC it is available in any mode, not just {$mode extendedPascal}
.
single characters |
|
character pairs |
|