How can I enforce evaluation during definition in a plugin function?

How can I enforce evaluation during definition in a plugin function? - Messages

#1 Posted: 11/3/2019 8:28:54 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

In newer SMath versions, it seems that the function Solve() from the Maxima plugin isnt't evaluated if it's result is to be stored in a variable.
It is only evaluated, when this variable is displayed.
It is not even evaluated, when used in at().
This breaks the mechanism for solution assignment using at() which was possible in earlier versions.

I see two options to repair this:
1. enforce evaluation of Solve() immediately when used in a definition
2. modify at() such that evaluation of it's arguments is enforced prior to execution.

I think that version 1 would be appropriate, because if I still want to delay evaluation to the actual function call, I still can use the line operator for verbatim storage of the definition.

EDIT: It turns out that the line operator actually enforces evaluation by at(), see this post

Solve-3.png
Solve-3.sm (14 KiB) downloaded 24 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Posted: 11/3/2019 1:23:28 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Certainly useful, maybe not so much.

Implicit-roots.PNG
  • New Posts New Posts
  • No New Posts No New Posts