Thema: Delphi zuviele 'or's?

Einzelnen Beitrag anzeigen

choose

Registriert seit: 2. Nov 2003
Ort: Bei Kiel, SH
729 Beiträge
 
Delphi 2006 Architect
 
#7

Re: zuviele 'or's?

  Alt 4. Feb 2004, 10:58
Hallo Peter,
Zitat von Peter Lustig:
Und nur die [Bool'sche Asdrücke] kannst Du mit einem OR logisch verknüpfen!
ist eine mit Sicherheit eine Frage der Anschauung:
Delphi-Quellcode:
var
  myVar1, myVar2, myVar3: Cardinal;
begin
  // ...
  if (myVar1 or myVar2 or myVar3)>0 then
ist in diesem "Spezialfall" äquivalent zu
if (myVar1>0) or (myVar2>0) or (myVar3>0) then und mitunter sogar etwas performanter...
gruß, choose
  Mit Zitat antworten Zitat