How many ways to nest Conditionals ?

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
Guest

How many ways to nest Conditionals ?

Postby Guest » 01 May 2007

How many ways to nest Conditionals ?

I want to create a comprehensive and exhaustive list here:

Code: Select all

if condition1 then
    action1;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

if condition1 then
begin
    action1a;
    action1b;
end;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

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

.

Guest

Postby Guest » 01 May 2007

Code: Select all

if condition1 then
action1
else
action2;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

if condition1 then
action1

else

if condition2 then
action2;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

if condition1 then
begin

     if condition1a then
     actions1a

     else

     if condition1b then
     actions1b;

end;

.

Guest

Postby Guest » 01 May 2007

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;



.

Guest

Postby Guest » 01 May 2007

Code: Select all

If Condition1 Then
Begin
     action1a;
     action1b;
End

Else
action2 ;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

If Condition1 Then
Begin
     action1a;
     action1b;
End

Else

Begin
     actionX1a;
     actionX1b;
end;

.

Guest

Postby Guest » 01 May 2007

Code: Select all

If Condition1 Then

action1

Else

Begin
     action_X1a;
     action_X1b;
End;

.


Return to “User Contributed Studies and Indicator Library”