m_gl_next

synopsis: INT m_gl_next(OP a,b,c)

description:

computes the next element in the corresponding group a ist the group label, b is a element, and c becomes the next one. If b is already the last one the return value is FALSE, else it is TRUE. b and c may be the same object.

example:

 computes the number of elements in a alternating group, using the
 above routines:
 #include "def.h"
 #include "macro.h"
 main()
 {
 OP a,b,c,d;
 anfang();
 a=callocobject(); b=callocobject(); c=callocobject(); d=callocobject();
 scan(INTEGER,a); m_gl_alt(a,b);
 m_gl_first(b,c); println(c);
 m_i_i(1L,d);
 while( m_gl_next(b,c,c) ) inc(d);
 println(d); println(c);

 freeall(a); freeall(b); freeall(c); freeall(d);
 ende();
 }


Send comments or suggestions to:
symmetrica (at) symmetrica

this page was automatically generated on So Aug 10 12:23:24 CEST 2008 on the machine btn6xa