Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi If...then x und y (https://www.delphipraxis.net/84380-if-then-x-und-y.html)

Fridolin 16. Jan 2007 09:31


If...then x und y
 
Hallo zusammen,

kann mir jemand sagen, wie es geht, eine if..then anweisung mit zwei befehlen auszustatten?

z.B.:

Delphi-Quellcode:

if a > b then
 c := a

und

ShowMessage('a > b')
else
c := b;
mfg
Florian

Klaus01 16. Jan 2007 09:34

Re: If...then x und y
 
Delphi-Quellcode:
if a > b then
  begin
    c := a;
    ShowMessage('a > b');
  end
else
  c := b;
einfach die Befehle mit begin und end einfassen.

Grüße
Klaus

Fridolin 16. Jan 2007 10:11

Re: If...then x und y
 
Super, Danke... :lol:


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz