[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Assigning to Element of Array of Records Doesn't Seem t
From: |
Martin Rubey |
Subject: |
Re: [Axiom-mail] Assigning to Element of Array of Records Doesn't Seem to Work |
Date: |
08 Aug 2007 12:27:43 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Bill Wood <address@hidden> writes:
> 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:
> 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.
ys(2) is not a single variable, nor a Tuple of variables, but I guess it should
go through as a reference to an entry in an object supporting setelt. Well,
currently it does not. Thus,
> What do I have to do to set the fields of the records to desired
> values???
use a temporary variable:
(4) -> el := ys(2)
(4) [k= 0,rad= 0]
Type: Record(k: Integer,rad: Integer)
(5) -> el.k := 10
(5) 10
Type: PositiveInteger
(6) -> ys
(6) [[k= 0,rad= 0],[k= 10,rad= 0],[k= 0,rad= 0]]
Type: OneDimensionalArray Record(k: Integer,rad: Integer)
Martin