Continue Statement Property

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

then "continue" state at (t + 1) = "continuing"

When LW Python encounters a "continue" statement, it will set the "continue" state to "continuing," which signals LW Python to decrease the tab number until it finds a "while" statement.

For example, if the following are true:

  • the line at time 88 = 6
  • the tab at time 88 = 2
  • statement at line 6, tab 2 = continue

then "continue" state at (88 + 1) = "continuing"

Try stepping through the simulator to see "Continue" state set to "continuing" on line 6.

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments