End Continuing Line Property

If the "continue" state is "continuing" and there is a "while" statement in the current tab number - 1, then the line number is updated to the "while" statement's line. 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 the line at time (t + 1) = while_line

If LW Python finds a "while" statement on the parent tab (current tab - 1), then the "continuing" state is finished, and the line number updated to the "while" statement.

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 the line at time (37 + 1) = 3

Try stepping through the simulator to see the "Current Line" change from 6 to 3.

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments