Decrement Tab Line Property

If LW Python's internal tab number is greater than the current statement tab number and the "if" block just ended, then the line number remains the same (while the tab is decreasing). More formally,

if the following are true:
  • the line at time t = i
  • the tab at time t = j
  • statement at line i, tab k = s
  • k < j
  • value at (j - 1) in map (Control Map at time t) = pair ("if", if_value)

then the line at time (t + 1) = i

For example, if the following are true:
  • the line at time 14 = 4
  • the tab at time 14 = 1
  • statement at line 4, tab 0 = c = 5
  • value at (1 - 1) in map (Control Map at time 14) = pair ("if", False)

then the line at time (14 + 1) = 4

Try stepping through the simulator to see LW Python keep the line number the same while the tab number decrements by 1.

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments