Autor Beitrag
Bennle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WinXP
Delphi 2007 Pro, C# (VS 2005)
BeitragVerfasst: Sa 04.06.05 19:50 
Hallo,

Also eigentlich verstehe ich die Sprache schon gut, aber momentan verzeifle ich gerade!

Ich Programmiere in Php und VB nun will ich auch Delphi etwas kennen lernen :?

Aber es scheitert an einer einfachen IF-Anweisung

Also ganz kurz!

Ich schreib meine If Zeile danach "then" und dann möchte ich mehr als eine zeile definieren!

Aber wie???

Ich kann das nicht mit den Klammern ( {} ) wie bei PHP machen! Schade :P

Hab schon viel gemacht und es wäre schade wenn es an soetwas scheitert! (Indy is schon drin :D)

Also danke für eure Antworten!

MfG
Bennle
OneOfTen
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 04.06.05 19:52 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
if // bedingung
then begin
     end
else begin
     end;
Maweki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 197

Ubuntu Linux
Lazarus
BeitragVerfasst: Sa 04.06.05 19:57 
dann doch bitte richtig (nach Styleguide)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
if {Bedingung} then
begin
  //Anweisung
end
else
begin
  //Anweisung
end;


;)
Taladan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88


Delphi 2005 Personal
BeitragVerfasst: Sa 04.06.05 19:58 
Eigendlich ganz einfach. Man nehme die Hilfe von Delphi zu rate.

Kurzfassung:


ausblenden Delphi-Quelltext
1:
  If (Variable = Variable) then Anweisung;					

oder
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  If (Variable = Variable) then 
  begin
      Anweisung;
      Anweisung2;
      ...
  end;

oder
ausblenden Delphi-Quelltext
1:
  If (Variable = Variable) then Anweisung else AndereAnweisung;					

oder
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  If (Variable = Variable) then 
  begin
      Anweisung;
      Anweisung2;
      ...
  end
  else begin 
      AndereAnweisung;
      AndereAnweisung2;
      ...
  end;
Bennle Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WinXP
Delphi 2007 Pro, C# (VS 2005)
BeitragVerfasst: Sa 04.06.05 20:00 
Danke euch!!

Hätte aber auch selber drauf kommen können!!

Naja heute schein nich mein Tag zu sein :D

MfG
Bennle