End Continuing State Property
If the "continue" state is "continuing" and there is a "while" statement in the current tab number - 1, then the "Continue" state is changed to "not_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 = True
then "continue" state at (t + 1) = "not_continuing"
If LW Python finds a "while" statement on the current tab - 1, then the "continuing" state is finished, so it is changed to "not_continuing."
For example,
if the following are true:
- the line at time 37 = 6
- the tab at time 37 = 1
- "continue" state at 37 = "continuing"
- value at (1 - 1) in map (Control Map at time 37) = pair ("while", 3)
then "continue" state at (37 + 1) = "not_continuing"
Try stepping through the simulator to see the "Continue State" change from "continuing" to "not_continuing."
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments