Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline MarB  
#1 Posted : 25 June 2020 10:11:55(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 58

Was thanked: 12 time(s) in 12 post(s)
Hi!

I used the red bordered equation (and similar constructions) for a long time.

But this doesn't work no more.
Even if the result of the test is false, the true expression is evaluated, which fails in this example.
If/else does the job.

Assigning the equation to one variable works initially, but on second sight one can see, that the expression isn't really evaluated but only stored.

Is this all the intended behaviour? And why did it change?

Thanks,
Martincases.png

Edited by user 25 June 2020 10:57:11(UTC)  | Reason: Subject

Offline Davide Carpi  
#2 Posted : 25 June 2020 13:32:02(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,312
Man
Italy
Location: Italy

Was thanked: 1167 time(s) in 768 post(s)
Last change in cases logic was 3-4 years ago, so it's probably something in the program or something not experienced.

The behavior is known as I've mentioned it sometimes, usually when I see examples where definitions were made inside cases arguments.

I'll see if I can do something function-side altough if it works it might change some other behavior.




If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 25/06/2020(UTC)
Offline MarB  
#3 Posted : 25 June 2020 15:04:44(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 58

Was thanked: 12 time(s) in 12 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Last change in cases logic was 3-4 years ago, so it's probably something in the program or something not experienced.
...

I changed some time ago from the last stable to the current beta.

Did a test with the Version 0.99.6884 (portable, 32-bit). (Should have done before posting.)
With this version the described behaviour does not occur.
Offline Davide Carpi  
#4 Posted : 29 June 2020 01:47:17(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,312
Man
Italy
Location: Italy

Was thanked: 1167 time(s) in 768 post(s)
Plugin updated, now it should work 1:1 as before (no evaluation is performed on definition).

Please be careful however, since a symbolic evaluation to show the function content or a failed evaluation with an error triggered on the conditions leads to the evalution of all the options.
In general currently is better to use cases to host just dead content (numbers, strings, variables).
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 29/06/2020(UTC),  on 29/06/2020(UTC)
Offline MarB  
#5 Posted : 29 June 2020 10:03:42(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 58

Was thanked: 12 time(s) in 12 post(s)
Thank you Davide for your efforts.

With 0.99.72.51:

But now, the evaluation of the equation fails, even without assigning the result to a variable.

To me it looks like the result is the evaluated test clause.

cases2.png

With 0.99.68.84 it works.

Edited by user 29 June 2020 10:16:00(UTC)  | Reason: Version info added.

Offline Davide Carpi  
#6 Posted : 29 June 2020 14:20:56(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,312
Man
Italy
Location: Italy

Was thanked: 1167 time(s) in 768 post(s)
Originally Posted by: MarB Go to Quoted Post
Thank you Davide for your efforts.

With 0.99.72.51:

But now, the evaluation of the equation fails, even without assigning the result to a variable.

To me it looks like the result is the evaluated test clause.

cases2.png

With 0.99.68.84 it works.


Thank you, I messed up with the code. The update is now deleted and I'll upload a new version ASAP. You can remove the plugin and reinstall the latest.

Edited by user 29 June 2020 14:24:30(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Davide Carpi  
#7 Posted : 30 June 2020 01:32:01(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,312
Man
Italy
Location: Italy

Was thanked: 1167 time(s) in 768 post(s)
updated, released as beta Beta
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 30/06/2020(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.