Sign in Join
Wiki copytemporary

Not/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Not/de

OldNewLine
1+Zurück zu den [[Reserved words/de|reservierten Wörtern]].
2+
3+Das reservierte Wort <b>not</b> kann verwendet werden als:
4+
5+- negation eines booleschen Ausdrucks
6+- binäre Negation eines Wertes
7+
8+Beispiel für die Negation eines booleschen Ausdrucks:
9+
10+``` pascal
11+var
12+ intI: Integer;
13+begin
14+ ...
15+ if not (intI > 2) then ; // Durch das Reservierte Wort not wird das Ergebnis in sein Gegenteil verkehrt
16+ // Ist das Ergebnis in der Klammer True dann liefert der not-Operator False
17+ // Ist das Ergebnis in der Klammer False dann liefert der not-Operator True
18+ ...
19+end;
20+```
21+
22+Beispiel für die binäre Negation eines Wertes:
23+
24+Binärdarstellung der Zahl 3: 0000 0011 Mit dem reservierten Wort not wird der Binärwert umgedreht: 1111 1100
25+
26+``` pascal
27+var
28+ intI: Integer;
29+begin
30+ ...
31+ intI := ...;
32+ ... := not intI; // Dreht den binären Wert der Variablen intI um
33+ ...
34+end;
35+```
36+
37+---
38+*From the Free Pascal wiki, page "Not/de", as it stood on 2020-02-21 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history