Continuing State Property
If the "continue" state is "continuing" at time t, and there is no "while" statement in the current tab, then at time t + 1, the "continue" state stays in "continuing." 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 "continue" state at (t + 1) = "continuing"
The "continue" state will remain in "continuing" until LW Python finds a "while" statement on the current tab.
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 "continue" state at (36 + 1) = "continuing"
Try stepping through the simulator to see the "Continue State" remain in "continuing" 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