Sign in Join
Wiki copytemporary

Not/de: what changed

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

OldNewLine
11Zurück zu den [[Reserved words/de|reservierten Wörtern]].
22
3-Das reservierte Wort <b>not</b> kann verwendet werden als:
3+Das reservierte Wort not kann verwendet werden als:
44
55- negation eines booleschen Ausdrucks
66- binäre Negation eines Wertes
77
88Beispiel für die Negation eines booleschen Ausdrucks:
99
1010``` pascal
1111var
1212 intI: Integer;
1313begin
1414 ...
1515 if not (intI > 2) then ; // Durch das Reservierte Wort not wird das Ergebnis in sein Gegenteil verkehrt
1616 // Ist das Ergebnis in der Klammer True dann liefert der not-Operator False
1717 // Ist das Ergebnis in der Klammer False dann liefert der not-Operator True
1818 ...
1919end;
2020```
2121
2222Beispiel für die binäre Negation eines Wertes:
2323
2424Binärdarstellung der Zahl 3: 0000 0011 Mit dem reservierten Wort not wird der Binärwert umgedreht: 1111 1100
2525
2626``` pascal
2727var
2828 intI: Integer;
2929begin
3030 ...
3131 intI := ...;
3232 ... := not intI; // Dreht den binären Wert der Variablen intI um
3333 ...
3434end;
3535```
3636
3737---
3838*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