Unexpected behavior

Unexpected behavior - Messages

#1 Posted: 8/23/2018 3:06:44 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

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

File not found.File not found.
#2 Posted: 8/23/2018 5:01:02 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: 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 users liked this post
sergio 8/23/2018 1:04:00 PM
#3 Posted: 8/23/2018 12:22:11 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: 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 users liked this post
Davide Carpi 8/23/2018 8:52:00 PM
  • New Posts New Posts
  • No New Posts No New Posts