Entry Evaluation Property

After the entry key and value have been evaluated and stored in the "Values" stack, LW Python creates a new entry object with the stack values and assigns this to the "Return Value." More formally,

if the following are true:
  • expression state at time t = "call_function_begin"
  • Value Stack at time t = [ [ evaluated_value, [ evaluated_key, [ ] ] ], stack ]
  • the expression at time t = entry key: value

then Return Value at time (t + 1) = entry evaluated_key: evaluated_value

For example, if the following are true:

  • (expression state at time 11) = "call_function_begin"
  • (value stack at time 11) = [ [ "Spain", [ "ES", [ ] ] ], [ [ ], [ ] ] ]
  • (the expression at time 11) = (entry "ES":"Spain")
then (return value at time (11 + 1)) = (entry "ES":"Spain")

Try stepping through the simulator to see LW Python set the "Return Value" to the new entry.

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments