The Length and Collected commands are what you are looking for.

gap> list:="abbccc";;
gap> Length(list);
6
gap> Collected(list);
[ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ] ]


Robert F. Morse



On Fri, May 14, 2010 at 4:47 AM, Jan Schneider <jans...@gmx.de> wrote:
> Hi there,
> I'm just wondering, whether you all can tell me how to count the objects of a 
> list. If I define for example a list:="abbccc", how do I manage to let GAP 
> count the letters?
> Hope to hear from you soon.
>
> Thanks
> Stefan
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> _______________________________________________
> Forum mailing list
> Forum@mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>

_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to