[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-mail] Assigning to Element of Array of Records Doesn't Seem to Wo
From: |
Bill Wood |
Subject: |
[Axiom-mail] Assigning to Element of Array of Records Doesn't Seem to Work |
Date: |
Wed, 08 Aug 2007 04:41:10 -0500 |
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
- [Axiom-mail] Assigning to Element of Array of Records Doesn't Seem to Work,
Bill Wood <=