Call Build Arguments Rule: Parameters
When the state is "call_build_args" and the "Parameters" list is not empty, then pop the first element from the list.
if the following are true:
- expression state at time t = "call_build_args"
- Parameters List at time t = [ var, frest ]
- Argument Values at time t = [ value, vrest ]
then Parameters List at time (t + 1) = frest
When the state is "call_build_args," elements are popped from the "Parameters" list and used as keys in the "Function Variables" map.
For example,
if the following are true:
- expression state at time 11 = "call_build_args"
- Parameters List at time 11 = [ x, [ ] ]
- Argument Values at time 11 = [ 5, [ ] ]
then Parameters List at time (11 + 1) = [ ]
Try stepping through the simulator to see LW Python pop "x" from the "Parameterse" list.
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments