On Tue, May 06, 2025 at 10:51:28AM +0200, 'Ralf Hemmecke' via FriCAS - computer 
algebra system wrote:
> Unfortunately, interpret_in_new_env does not keep interpreted macros
> private. :-(
> 
> Ralf
> 
> %%% (7) ->
> interpret_in_new_env(parse("xx==>5;yy:=xx+3")$InputForm)$InputForm
> 
>    (7)  8
>                                                         Type:
> PositiveInteger
> %%% (8) -> xx
> 
>    (8)  5
>                                                         Type:
> PositiveInteger

Actually, already 'parse' causes trouble:

(1) -> parse("xx==>5;yy:=xx+3")$InputForm

   (1)  (SEQ /throwAway (LET yy (+ 5 3)))
                                                              Type: InputForm
(2) -> xx

   (2)  5
                                                        Type: PositiveInteger

AFAICS fixing this requires rework of macro handling in interpreter.
I have now version which passes all our tests and gives expected
result in your example, but it may have significant problems
(our testsuite tests only a few simple macro uses).

-- 


                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/aB9_Qemtmoz3v2tQ%40fricas.org.

Reply via email to