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: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: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-B) joined with (B-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}}
[[Category: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}.


navigation bar: topic: Pascal symbols
single characters

+ (plus)  •  - (minus)  •  * (asterisk)  •  / (slash)
= (equal)  •  > (greater than)  •  < (less than)
. (period)  •  : (colon)  •  ; (semi colon)
^ (hat)  •  @ (at)
$ (dollar sign)  •  & (ampersand)  •  # (hash)
' (single quote)

character pairs

<> (not equal)  •  <= (less than or equal)  •  := (becomes)  •  >= (greater than or equal)

 •  >< (symmetric difference)  •  // (double slash)