Autor Beitrag
Delphianer23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 156



BeitragVerfasst: Di 04.02.03 17:07 
wie forumuliert man
"und"

es ginge zwar auch mit
if x=2 then
if y=4 then
dosoemthing


das ist aber länger und kann bei 10 xys schon nervig sein.
Git es sowas wie:


if (x=2||y=4) then (oder war es , oder : na keine Ahnung)
begin
dafdasfadsfadsf:
end;


???????????ß
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 04.02.03 17:19 
Hallo

ausblenden Quelltext
1:
2:
3:
4:
if (x=2) and (y=4) then
  begin
    blablabla
  end;



einfach in Klammern setzen

Mfg Frank[/code]

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 04.02.03 19:16 
Hi!

Schau Dir doch mal bitte diesen FAQ-Beitrag an. Der könnte für Dich sehr nützlich sein.

Zitat:
if (x=2||y=4) then
Kenne ich nur aus Java und da ist es "oder". Was Du wahrscheinlich meinst ist &&.

MfG,
Peter

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".