Elif Tab Property
If the "elif" statement tested true, then increment the tab number by 1. More formally,
if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
elif test:
- expression state at time t = "end_expr"
- Return Value at time t = True
then the tab at time (t + 1) = j + 1
If the "elif" statement tested true, then begin evaluating the "elif" block by incrementing the tab (and line) by 1. For example,
if the following are true:
- the line at time 22 = 3
- the tab at time 22 = 0
- statement at line 3, tab 0 =
elif __eq__(3, 3):
- expression state at time 22 = "end_expr"
- Return Value at time 22 = True
then the tab at time (22 + 1) = 0 + 1
Try stepping through the simulator to see LW Python increment the tab number to 1.
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments