Jump To Method Property
If the "Parameters" list is empty, then LW Python has finished going through the method parameters. LW Python will now jump to the method body. More formally,
if the following are true:
- expression state at time t = "call_build_args"
- Parameters List at time t = [ ]
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then the line at time (t + 1) = line + 1
if the following are true:
- expression state at time 58 = "call_build_args"
- Parameters List at time 58 = [ ]
- the expression at time 58 =
p.age_in_months()
- line number of method "age_in_months" of class "Person" in (Class Map at time 58) = 6
then the line at time (58 + 1) = 6 + 1
Try stepping through the simulator to see LW Python jump to line 7.
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments