Assigning to Element of Array of Records Doesn't Seem to Work

Bill Wood <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <1186566070.722.10.camel@localhost>
I'm just trying to assign to a field of a record in a one-dimensional
array of records, but I get this incomprehensible message:
=====================================================================
(1) -> )clear all
   All user variables and function definitions have been cleared.
(1) -> )read foo.input
-- File of Axiom definitions solving problem 124.
-- Created 2007/08/08 by Bill Wood.

init_rec() ==
  r : Record(k: INT, rad: INT) := [0,0]
  r

                                           Type: Void
(2) -> xs := [init_rec() for i in 1..3]
   Compiling function initrec with type () -> Record(k: Integer,rad:
      Integer)

   (2)  [[k= 0,rad= 0],[k= 0,rad= 0],[k= 0,rad= 0]]
                      Type: List Record(k: Integer,rad: Integer)
(3) -> ys := oneDimensionalArray(xs)
(3) ->
   (3)  [[k= 0,rad= 0],[k= 0,rad= 0],[k= 0,rad= 0]]
           Type: OneDimensionalArray Record(k: Integer,rad: Integer)
(4) -> ys
(4) ->
   (4)  [[k= 0,rad= 0],[k= 0,rad= 0],[k= 0,rad= 0]]
           Type: OneDimensionalArray Record(k: Integer,rad: Integer)
(5) -> ys(2).k := 10
 5) ->
   The form on the left hand side of an assignment must be a single
      variable, a Tuple of variables or a reference to an entry in an
      object supporting the setelt operation.
(5) ->
=======================================================================
What do I have to do to set the fields of the records to desired
values???

 -- Bill Wood
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.