Sign in Join
Wiki copytemporary

Revision 1 of 2, by Trev on 2-21-2020. The page as it is now.

Not/de

Zurück zu den reservierten Wörtern.

Das reservierte Wort <b>not</b> kann verwendet werden als:

Beispiel für die Negation eines booleschen Ausdrucks:

pascal
var
  intI: Integer;
begin
  ...
  if not (intI > 2) then ;  // Durch das Reservierte Wort not wird das Ergebnis in sein Gegenteil verkehrt
                            // Ist das Ergebnis in der Klammer True dann liefert der not-Operator False
                            // Ist das Ergebnis in der Klammer False dann liefert der not-Operator True
  ...
end;

Beispiel für die binäre Negation eines Wertes:

Binärdarstellung der Zahl 3: 0000 0011 Mit dem reservierten Wort not wird der Binärwert umgedreht: 1111 1100

pascal
var
  intI: Integer;
begin
  ...
  intI := ...;
  ... := not intI;  // Dreht den binären Wert der Variablen intI um
  ...
end;

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.