login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #169 Print empty two dimensional array (i.e. Matrix, TwonDimensionalArray ...) revision 2 of 6

1 2 3 4 5 6
Editor: kratt6
Time: 2007/12/20 11:23:04 GMT-8
Note:

added:

From kratt6 Thu Dec 20 11:23:00 -0800 2007
From: kratt6
Date: Thu, 20 Dec 2007 11:23:00 -0800
Subject: 
Message-ID: <20071220112300-0800@axiom-wiki.newsynthesis.org>

I investigated a little further:
\begin{axiom}
(matrix [[1,2]])::OUTFORM::SEX
(empty()$Matrix INT)::OUTFORM::SEX
\end{axiom}
I believe that this shows that the bug is in the boot display routines.  In OUTFORM we find::

        matrix ll ==
            lv:$ := [LIST2VEC$Lisp l for l in ll]
            CONS(eform MATRIX, LIST2VEC$Lisp lv)$Lisp

\begin{axiom}
matrix []
\end{axiom}
could be equivalent to 'empty()$Matrix INT'.  On the other hand, the interpreter has no way to determine the type of this matrix, so the error is probably OK.
\begin{axiom}
matrix [[]]
\end{axiom}
does indeed not make any sense at all.

Submitted by : (unknown) at: 2007-11-17T22:01:39-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Empty one dimensional arrays are printed but no empty two dimensional array in console.

Text Mode
empty Matrix not printed

axiom
)set output algebra on )set output tex off

axiom
empty()$Vector(INT) (1) []
Type: Vector Integer
axiom
empty()$Matrix(INT) (2)
Type: Matrix Integer

LaTeX? mode
empty Matrix causes error

axiom
)set output algebra off )set output tex on

axiom
empty()$Vector(INT)
LatexWiki Image(1)
Type: Vector Integer
axiom
empty()$Matrix(INT) >> System error: Cannot take first of an empty list

property change --kratt6, Thu, 23 Jun 2005 06:32:24 -0500 reply
Category: general => Axiom User Interface

I investigated a little further:
axiom
(matrix [[1,2]])::OUTFORM::SEX
LatexWiki Image(1)
Type: SExpression?
axiom
(empty()$Matrix INT)::OUTFORM::SEX
LatexWiki Image(2)
Type: SExpression?

I believe that this shows that the bug is in the boot display routines. In OUTFORM we find:

        matrix ll ==
            lv:<img alt="LatexWiki Image" class="equation" src="images/864897927170980787-18.0px.png" width="123" height="17"/>Lisp l for l in ll]
            CONS(eform MATRIX, LIST2VEC<img alt="LatexWiki Image" class="equation" src="images/2154036167070567173-18.0px.png" width="53" height="18"/>Lisp

axiom
matrix [] >> Error detected within library code: new: arrays with zero rows are not supported

could be equivalent to empty()$Matrix INT. On the other hand, the interpreter has no way to determine the type of this matrix, so the error is probably OK.

axiom
matrix [[]] >> Error detected within library code: matrices with zero columns are not supported

does indeed not make any sense at all.