My student has a global list and has made a local variable list set equal to the global list so that he can delete items from the temporary list. The problem is that the original list is also being changed which shouldn't happen. Can someone help?
Thanks
TIMAI2
March 6, 2024, 5:13pm
2
Use the copy list block to prevent the original global list from being changed
Taifun
March 6, 2024, 6:11pm
3
this "feature" is called call by reference ... probably interesting to know the difference between call by rererence and call by value ...
see also
In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a parameter-passing strategy that defines the kind of value that is passed to the function for each parameter (the binding strategy) and whether to evaluate the parameters of a function call, and if so in what order (the evaluation order). The notion of reduction strategy is distinct, although some authors conflate the two te To illustrate,...
Taifun
system
Closed
March 13, 2024, 6:11pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.