Bug SS-2335
1 vote

Cannot redefine a function when contains eval() - function not defined error

Created by Davide on 5/3/2016 9:02 PM Last Updated by smath on 5/17/2016 6:30 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

When a function contains eval(), it cannot be defined again (it is defined and stored, but evaluation is no more possible). Worked in SS 0.97.*.

 

    smath (Tuesday, May 17, 2016 6:30 PM) #

Davide,

Yes, there are several functions such as if(), sum(), product(), diff() and maybe couple others - these functions supported to work with undefined variables inside. That is why they behave differently against to all other ones. I know about this issue and will address it a bit later.

Closing this ticket as an initial issue is fixed now.

    Davide (Tuesday, May 17, 2016 6:14 PM) #

True, eval(...) is no more an issue :)

wondering if if(...) can be cured in the same way (and other functions that acts in the same way, if they exists).

    Mike Kaganski (Tuesday, May 10, 2016 9:14 AM) #

eval() part seem to be fixed - I suppose with SS-167?

    Davide (Wednesday, May 4, 2016 3:09 AM) #

Ah, you are right, it didn't work neither in 0.97! The same happens with if/else....

Now I'm really confused because Jean has posted a file that wored in 0.97.5346 and doesn't work anymore in 0.98. One of the issues was about redefinition of functions based on if/else (and they should behave in the same way in both the versions),

    smath (Wednesday, May 4, 2016 2:16 AM) #

The reason is that if eval(..) cannot be calculated numerically it always raise an error. So, line with definition f(x):eval(2+x) just ignored by SMath Studio. As I remember we have this behavior from the first release of eval(..) function.

    smath (Wednesday, May 4, 2016 1:38 AM) #

Do not work in 0.97.5154 and 0.97.5890 as well.