Unexpected behavior

Unexpected behavior - 消息

#1 已发布: 2018/8/23 03:06:44
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi. I can not understand why the argument of the last function "disappears"
Thanks in advance
Alvaro.

未找到文件。未找到文件。
#2 已发布: 2018/8/23 05:01:02
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

The answer is in dec2bas(x,b).

In the third row there is xx-m)/b; arguent:something inside the function is a pass-by-reference operation from the function to the argument, hence the behavior (900 becomes 0).

If you don't want it, assign x to an internal variable and do all the definition operations on that variable (f.e. z:x -> zz-m)/b)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1位用户喜欢此帖子
sergio 2018/8/23 13:04:00
#3 已发布: 2018/8/23 12:22:11
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

The answer is in dec2bas(x,b).

In the third row there is xx-m)/b; arguent:something inside the function is a pass-by-reference operation from the function to the argument, hence the behavior (900 becomes 0).

If you don't want it, assign x to an internal variable and do all the definition operations on that variable (f.e. z:x -> zz-m)/b)



Tante grazie Davide! I did not know where else I could look for the error, because I thought I had reviewed everything.

Best regards.
Alvaro.
1位用户喜欢此帖子
Davide Carpi 2018/8/23 20:52:00
  • 有新帖
  • 无新帖