Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
if condition1 then
statements
else if condition2 then
statements
else if condition3 then
statements
end if

i want to test that if my input matches condition2 then it should also check for condition 3
is it possible??

What I have tried:

i tried with GOTO but it didnt work. if condition2 matches it doesnt check condition3
if condition1 then
statements
else if condition2 then
statements
GOTO label1
label1: else if condition3
statements
end if
Posted
Updated 28-Sep-17 20:15pm

Try:
if condition1 then
   statements
else if condition2 then
   statements
   if condition3 then
      statements
   end if
end if
 
Share this answer
 
if condition1 then
   statements

else if condition2 then
   statements
   if condition3 then
      statements
   end if

else if condition3 then
      statements
end if

end if
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900