There are two forms of if statement:
// if...then
if x<>0 then // do something
// if...then...else
if x=0 then // do something
else // do something another
begin end pair can be used:
if x=0 then
begin
// do something
end
else
begin
// do something another
end;
; cannot be placed before else:
if A>B then AProc; < illegal!
else BProc
if statements can be nested:
if S='Greatis Software' then GoToLink('http://www.greatis.com')
else
if S='Microsoft' then GoToLink('http://www.microsoft.com')
else GoToLink('http://www.google.com');
|