Parameters of a function are linked with passed variables

Parameters of a function are linked with passed variables - 消息

#1 已发布: 2012/2/8 10:11:46
vsandre

vsandre

0个赞,共8个帖子。

组: User

If I pass a variable to a function, not only the value of the variable is passed. The hole variable is linked to the parameter. If work with the passed parameter and change it, the refering variable is also changed.

In my opinion it should not work this way. All parameters and new described variables should be privately used inside the function.

#2 已发布: 2012/2/8 12:23:12
Radovan Omorjan

Radovan Omorjan

325个赞和1个踩,共2,052个帖子。

组: Moderator

Hello,

This behavior has been introduced in v0.9, and some bugs corrected in 0.91. Please look at this post Functions behaves differently in 0.9. One of the reason is the graphs animations feature introduced.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 已发布: 2012/2/9 05:54:52
vsandre

vsandre

0个赞,共8个帖子。

组: User

At the moment I doesn't like the behaviour, but I will try to follow the arguments.
  • 有新帖
  • 无新帖