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

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

#1 Опубликовано: 6 лет назад
Martin Kraska

Martin Kraska

1 230 сообщений из 2 156 понравились пользователям.

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

Jean Giraud

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

Группа: User

Certainly useful, maybe not so much.

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