[PATCH] fix regression in 87515e1d

2 views
Skip to first unread message

Qian Yun

unread,
5:59 AM (11 hours ago) 5:59 AM
to fricas-devel
You can trigger the error when trying to do ")set output algebra"
in hypertex.

(1) ->
>> System error:
The index 2 is too large for a list of length 0.


- Qian

diff --git a/src/algebra/fortpak.spad b/src/algebra/fortpak.spad
index 7f79a98f..649848cd 100644
--- a/src/algebra/fortpak.spad
+++ b/src/algebra/fortpak.spad
@@ -190,7 +190,7 @@
if empty? fortranOutputStack then
push!(string(fort_out_file), fortranOutputStack)
else if not(top(fortranOutputStack) = string(fort_out_file)) then
- pop!(fort_out_file)
+ pop!(fortranOutputStack)
push!(string(fort_out_file), fortranOutputStack)
push!( fn, fortranOutputStack)
systemCommand concat(["set output fortran quiet ", fn])$String
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 893b4da8..881d6fb3 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -290,6 +290,7 @@
get_formatted_stream() == get_lisp_stream($formatted_out_rec.$stream_off)

get_out_rec(branch) ==
+ branch = 'algebra => $algebra_out_rec
branch = 'fortran => $fortran_out_rec
branch = 'mathml => $mathml_out_rec
branch = 'texmacs => $texmacs_out_rec

Waldek Hebisch

unread,
7:09 AM (10 hours ago) 7:09 AM
to fricas...@googlegroups.com
On Mon, Jun 01, 2026 at 05:59:31PM +0800, Qian Yun wrote:
> You can trigger the error when trying to do ")set output algebra"
> in hypertex.
>
> (1) ->
> >> System error:
> The index 2 is too large for a list of length 0.

Thanks, please commit

> diff --git a/src/algebra/fortpak.spad b/src/algebra/fortpak.spad
> index 7f79a98f..649848cd 100644
> --- a/src/algebra/fortpak.spad
> +++ b/src/algebra/fortpak.spad
> @@ -190,7 +190,7 @@
> if empty? fortranOutputStack then
> push!(string(fort_out_file), fortranOutputStack)
> else if not(top(fortranOutputStack) = string(fort_out_file)) then
> - pop!(fort_out_file)
> + pop!(fortranOutputStack)
> push!(string(fort_out_file), fortranOutputStack)
> push!( fn, fortranOutputStack)
> systemCommand concat(["set output fortran quiet ", fn])$String
> diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
> index 893b4da8..881d6fb3 100644
> --- a/src/interp/i-output.boot
> +++ b/src/interp/i-output.boot
> @@ -290,6 +290,7 @@
> get_formatted_stream() == get_lisp_stream($formatted_out_rec.$stream_off)
>
> get_out_rec(branch) ==
> + branch = 'algebra => $algebra_out_rec
> branch = 'fortran => $fortran_out_rec
> branch = 'mathml => $mathml_out_rec
> branch = 'texmacs => $texmacs_out_rec
>
> --
> 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...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/19282d16-8ed9-4ceb-93a6-74c42832639f%40gmail.com.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages