[GAP Forum] Bug in Add (list function)?
Benjamin Sambale
benjamin.sambale at uni-jena.de
Tue Sep 21 10:42:22 BST 2010
Dear GAP Forum,
consider this small GAP code (I hope it is minimal somehow):
L:=[];
e:=[1];
for s in [[1],[0]] do
e[1]:=s[1];
Add(L,e);
od;
After that the list L should be [ [ 1 ], [ 0 ] ]. However GAP gives [ [
0 ], [ 0 ] ]. I'm not quite sure if this is a bug. It seems to me that
the Add function only adds a pointer or something similar. Note that the
code works as expected if one uses e:=1 and so on (without additional
square brackets). By the way I'm using GAP 4.4.12.
Thanks for clarification,
Benjamin Sambale
More information about the Forum
mailing list