Changes
http://wiki.axiom-developer.org/378DeclarationsWithMultipleVariablesDontWorkInsideOfFunctions/diff
--
The syntax for declarations which have multiple variables is given
on page 142 of the Axiom book. However, using this syntax inside
a function results in the compiler failing.
The first time an attempt is made to compile a function which uses
this syntax, no diagnostic is produced. However, the libraries
needed by the function being compiled are not loaded, and the
function itself is not executed (or at least it doesn't produce
any output). If a second attempt is made to execute the function,
a "System error" results.
The following session transcript demonstrates the problem. It
attempts to execute two functions. The first of these, named "bug",
demonstrates the behavior described above. The second function,
named "nonbug", is identical to "bug" except that the declaration
containing two variables has been replaced by two declarations
each containing a single variable. Axiom handles the "nonbug"
function correctly, demonstrating that the problem is triggered
by a declaration containing multiple variables. The transcript
follows:
$ axiom
AXIOM Computer Algebra System
Version: Axiom (April 2006)
Timestamp: Wednesday June 21, 2006 at 03:45:56
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
Re-reading compress.daase Re-reading interp.daase
Re-reading operation.daase
Re-reading category.daase
Re-reading browse.daase
(1) ->
(1) -> bug(x) == (local a, b; (a, b) : Integer; 1)
Type: Void
(2) -> bug(1)
Compiling function bug with type PositiveInteger -> PositiveInteger
(2) -> bug(1)
>> System error:
(|Tuple| |a| |b|) is not of type SYMBOL.
(2) -> nonbug(x) == (local c, d; c : Integer; d : Integer; 1)
Type: Void
(3) -> nonbug(1)
Compiling function nonbug with type PositiveInteger ->
PositiveInteger
Loading /home/ka/w/axiom/mnt/linux/algebra/PI.o for domain
PositiveInteger
Loading /home/ka/w/axiom/mnt/linux/algebra/NNI.o for domain
NonNegativeInteger
Loading /home/ka/w/axiom/mnt/linux/algebra/INT.o for domain Integer
Loading /home/ka/w/axiom/mnt/linux/algebra/OUTFORM.o for domain
OutputForm
Loading /home/ka/w/axiom/mnt/linux/algebra/LIST.o for domain List
(3) 1
Type: PositiveInteger
(4) -> )quit
--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]