Page 1 of 1

How many ways to nest Conditionals ?

Posted: 01 May 2007
by Guest
How many ways to nest Conditionals ?

I want to create a comprehensive and exhaustive list here:

Code: Select all

if condition1 then
action1;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
begin
action1a;
action1b;
end;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
begin
if condition1a then
actions1a
else
actions1b;
end;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
action1
else
action2;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
action1

else

if condition2 then
action2;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
begin

if condition1a then
actions1a

else

if condition1b then
actions1b;

end;
.

Posted: 01 May 2007
by Guest

Code: Select all

if condition1 then
begin

if condition1a then
begin
actions1a;
end;

end;
this can be written as

Code: Select all

if condition1 and condition1a then
begin
actions1a;
end;

.

Posted: 01 May 2007
by Guest

Code: Select all

If Condition1 Then
Begin
action1a;
action1b;
End

Else
action2 ;
.

Posted: 01 May 2007
by Guest

Code: Select all

If Condition1 Then
Begin
action1a;
action1b;
End

Else

Begin
actionX1a;
actionX1b;
end;
.

Posted: 01 May 2007
by Guest

Code: Select all

If Condition1 Then

action1

Else

Begin
action_X1a;
action_X1b;
End;
.