Var.get_object_of_var()
Returns corresponding object of the variable.
The function returns the appropriate object for the Var, such as: LocalVariable, StateVariable, GlobalVariable, Argument.
It is essential to understand that Var represents not just a variable in general but a specific "placement" of that variable in the code while the classes like LocalVariable or StateVariable etc. represent the variable itself.
It is easy to see in an example:
Here the bots
argument is used in different instructions, and each usage of the bots will be represented by a different Var, while the Argument object that can be retrieved using the get_object_of_var() function will represent the bots
in general as an argument.
Example
Example Output
Last updated