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 := a + 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.
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
-- .- .-. - .. -. .-.. --- ...- . ... .- -. -. .. -.- .- Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551 Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, 52056 Aachen, Germany