Skip Elif Tab Property
If the "if" statement tested true, and LW Python is currently on a "elif" statement, then the tab number remains unchanged. 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:
- value at j in map (Control Map at time t) = pair ("if", True)
- expression state at time t = "not_expr"
then the tab at time (t + 1) = j
If the "if" statement tested true, then the "elif" statement and body will be skipped. This is accomplished by leaving the tab number unchanged. For example,
if the following are true:
- the line at time 13 = 3
- the tab at time 13 = 0
- statement at line 3, tab 0 =
elif __eq__(3, 3):
- value at 0 in map (Control Map at time 13) = pair ("if", True)
- expression state at time 13 = "not_expr"
then the tab at time (13 + 1) = 0
Try stepping through the simulator to see the "Tab" remain 0.
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments