 |
 |
 |
How to build a
PERMUTATIONobject |
How to build a PERMUTATIONobject
Here comes the routine that allows to build a
PERMUTATIONobject:
- NAME: m_il_p
- SYNOPSIS: INT m_il_p(INT l; OP p)
- DESCRIPTION: builds a PERMUTATIONobject with empty entries of
the specified length l. The kind of p becomes VECTOR.
We provide an example which reads with the standard C-function
scanf an INT variable from stdin, and generates a permutation of
the entered length, the entries of the list, representing the
permutation are empty objects ( =# ):
#include "def.h"
#include "macro.h"
main()
{
OP a;
INT l;
anfang();
a = callocobject();
scanf("% ld",& l);
m_il_p(l,a);
println(a);
freeall(a);
ende();
}
harald.fripertinger "at" uni-graz.at, May 26,
2011
 |
 |
 |
 |
 |
How to build a
PERMUTATIONobject |
 |
 |