This page demonstrages a bug with setelt. From the first report by Bill Wood: http://lists.nongnu.org/archive/html/axiom-mail/2007-08/msg00012.html fricas (1) -> init_rec() == (r : Record(k: INT, Type: Void
fricas xs := [init_rec() for i in 1..3]; fricas Compiling function init_rec with type () -> Record(k: Integer, Type: List(Record(k: Integer,
fricas ys := oneDimensionalArray(xs); Type: OneDimensionalArray?(Record(k: Integer,
fricas xs(2).k := 5
Type: PositiveInteger?
fricas xs.2.k := 5
Type: PositiveInteger?
fricas ys(2).k := 10
Type: PositiveInteger?
fricas ys.2.k := 5
Type: PositiveInteger?
Here is a demonstration that shows that the Aldor compiler has no problem with that construction. aldor #include "axiom" INT ==> Integer; R ==> Record(k: INT, aldor Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3344069441329748634-25px002.as using Aldor compiler and options -O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra Use the system command )set compiler args to change these options. "/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3344069441329748634-25px002.as", fricas zs:=myfoo() And the following code demonstrates that the problem lies in the interpreter and not in the SPAD compiler. spad )abbrev package BBB MyPkg spad Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8672852723378779648-25px004.spad using old system compiler. BBB abbreviates package MyPkg ------------------------------------------------------------------------ initializing NRLIB BBB for MyPkg compiling into NRLIB BBB compiling local initrec2 : () -> Record(k: Integer, fricas zs:=myfoo2()
Type: OneDimensionalArray?(Record(k: Integer,
... --test1, Tue, 13 May 2014 16:31:09 +0000 reply Status: open => closed
|