> < ^ Date: Fri, 24 Nov 1995 23:59:00 +0100 (MET)
> < ^ From: Martin Schoenert <martin.schoenert@math.rwth-aachen.de >
< ^ Subject: Re: Problem with ranges in GAP
David Wood wrote in his e-mail message of 1995/11/24

GAP seems to have some problems whenever doing an assignment or
arithmetic operation to an element of a list which is represented as a
range with a negative difference.

gap> a := [10,8..2];
[ 10, 8 .. 2 ]
gap> a[3] := a[3] + 4;
10
gap> a;
[ 10, -2, 10,, ]

I'm unable to repeat this problem here. Could you tell us which version
of GAP you are using, and on which machine this happens? Maybe other
GAP users can try this too and write us if this fails for them too
(maybe this is a machine/system/compiler dependent problem).
I suggest that we move this to 'GAP-Trouble@Math.RWTH-Aachen.DE' until
we have sorted it out.

He continued

Is there any way to force GAP to represent a list using the ordinary
list representation, instead of the compact range representation, even
when GAP has realised the list is in fact a range?

Simply adding '0' to the range will do the trick. 'IsRange' can be used
for the other direction (i.e., if you have a list that you know is a
range).

Martin.

-- .- .-. - .. -.  .-.. --- ...- . ...  .- -. -. .. -.- .-
Martin Sch"onert,   Martin.Schoenert@Math.RWTH-Aachen.DE,   +49 241 804551
Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, 52056 Aachen, Germany

> < [top]