Continuing Line Property
If the "continue" state is "continuing" and Python is inside an "if/elif/else" block at time t, then at time t + 1, line number remains the same. More formally,
if the following are true:
- the line at time t = i
- the tab at time t = j
- "continue" state at t = "continuing"
- value at (j - 1) in map (Control Map at time t) = control_value
- control_value describes a loop = False
then the line at time (t + 1) = i
While LW Python is in the "continuing" state, the line number will stay the same until LW Python finds a "while" statement on the parent tab (current tab - 1).
For example,
if the following are true:
- the line at time 36 = 6
- the tab at time 36 = 2
- "continue" state at 36 = "continuing"
- value at (2 - 1) in map (Control Map at time 36) = pair ("if", True)
then the line at time (36 + 1) = 6
Try stepping through the simulator to see "Current Line" remain at 6 while the "Current Tab" decreases.
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments