]> www.ginac.de Git - ginac.git/commit
Make symbol assignments global in ginsh.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 2 Jan 2025 17:37:07 +0000 (18:37 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 2 Jan 2025 22:00:29 +0000 (23:00 +0100)
commit22716a2cc76624dfc8a254c64361e51feeeedcf8
treeee133dc98f47c76dd6f980e3f9a3045e4fa4b944
parent110534c3ee2fc56c354e73bc484dc9ce38fb64bc
Make symbol assignments global in ginsh.

When assigning an expression to a symbol, scan all previously assigned
symbols for that new symbol to occur in the expressions and replace
it with the new expression.

This has the effect of making symbols global in the scope of a ginsh
session.

See <https://www.ginac.de/pipermail/ginac-devel/2024-December/002655.html>.

The patch restores the behavior prior to GiNaC 1.4.4. It actually
even improves on it because the old version was based on assigned
symbols and that did not work with circular assignments whereas
substituion does.
ginsh/ginsh_parser.ypp