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

How can I enforce evaluation during definition in a plugin function? - Сообщения

#1 Опубликовано: 03.11.2019 08:28:54
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 КиБ) скачан 26 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Опубликовано: 03.11.2019 13:23:28
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Certainly useful, maybe not so much.

Implicit-roots.PNG
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений