Autor Beitrag
G-McKree
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Sa 24.12.05 17:42 
Beispiel:

if A and B and (C or D) then
Fröhliche Weihnachten;

Frage:
Wenn A false ist, wird dann abgebrochen, oder prüft das Programm noch B,C und D?

...denn wenn dem so wär, könnte ich ja den Programmablauf beschleunigen, indem ich nach der unwarscheinlichsten Variable zuerst frage.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Sa 24.12.05 17:44 
Wenn A Falsch ist wird abgebrochen...

EDIT: Wenn du z.b. nimmst  if A and B and (MessageBox('LAAALAAALAA', 'Frage', MB_YESNO or MB_ICONQUESTION = ID_YES) then //machwas und A falsch ist wird die MessageBox nicht angezeigt werden ;)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
G-McKree Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Sa 24.12.05 17:47 
und umgedreht?

if A or B then
Fröhliche Ostern

sind Fröhliche Ostern schon wenn A true ist, oder wird noch B geprüft?
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Sa 24.12.05 17:49 
Dann wird B nicht mehr geprüft ;)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 24.12.05 17:50 
Und das stimmt so nicht. $B<F1>

_________________
Gruß
Hansa
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Sa 24.12.05 17:52 
Was stimmt nicht? Das mit and stimmt auf jeden fall.. bei or bin ich mir nicht ganz sicher ;)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 24.12.05 18:01 
user profile iconBorn-to-Frag hat folgendes geschrieben:
das mit and stimmt auf jeden fall..


Eben nicht in jedem Fall. Antwort war wohl zu kurz 8) , also : man schreibe innerhalb der Delphi-IDE in einem Textfenster irgendwohin $B und drückt dann sofort F1. Da kriegen sie geholfen.:mrgreen:

_________________
Gruß
Hansa
G-McKree Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: Sa 24.12.05 18:13 
was es nich alles gibt..
danke euch beiden, fröhliche Weihnachten