Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.251 Beiträge
Delphi 12 Athens
|
AW: Unterschied zwischen "not" und "false"?
11. Aug 2010, 16:20
Delphi-Quellcode:
var b: Boolean;
begin
Memo1.Lines.Add('');
Memo1.Lines.Add('b := false;');
b := false;
if b then Memo1.Lines.Add('if b then');
if not b then Memo1.Lines.Add('if not b then');
if b = false then Memo1.Lines.Add('if b = false then');
if b = true then Memo1.Lines.Add('if b = true then');
Memo1.Lines.Add('');
Memo1.Lines.Add('b := true;');
b := true;
if b then Memo1.Lines.Add('if b then');
if not b then Memo1.Lines.Add('if not b then');
if b = false then Memo1.Lines.Add('if b = false then');
if b = true then Memo1.Lines.Add('if b = true then');
Memo1.Lines.Add('');
Memo1.Lines.Add('b := 3;');
b := Boolean(3);
if b then Memo1.Lines.Add('if b then');
if not b then Memo1.Lines.Add('if not b then');
if b = false then Memo1.Lines.Add('if b = false then');
if b = true then Memo1.Lines.Add('if b = true then');
end;
Ein Therapeut entspricht 1024 Gigapeut.
|