- When An If Command Is Followed Directly By An Else Command Which Of These Best Describes What Will Happen This Is How 1 (58.58 KiB) Viewed 16 times
When an IF command is followed directly by an ELSE command, which of these best describes what will happen? This is how
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
When an IF command is followed directly by an ELSE command, which of these best describes what will happen? This is how
When an IF command is followed directly by an ELSE command, which of these best describes what will happen? This is how we implement a while loop. Such a block arrangement of code should never exist. The condition from the IF command is evaluated. If it is true, then the IF block of code will occur. Independent of this result, the ELSE block of code will be executed. The condition from the IF command is evaluated. If it is true, then the IF block of code will occur and the ELSE block will be skipped. If it is false, then the IF block of code will be skipped and the ELSE block will occur. Since this is a matter of sequence, the commands will be executed in their entirety, independent of any condition.