Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


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: 84

Was thanked: 21 time(s) in 17 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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

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,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 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 consider to support SMath Studio buying a plan; to offer me a coffee: 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: 84

Was thanked: 21 time(s) in 17 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,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 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 consider to support SMath Studio buying a plan; to offer me a coffee: 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: 84

Was thanked: 21 time(s) in 17 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,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 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 consider to support SMath Studio buying a plan; to offer me a coffee: 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,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
updated, released as beta Beta
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: 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.